- Causiq Semantic Events
-
Interfaces
- Interface: AccountAddedUser
- Interface: AccountCreated
- Interface: AccountDeleted
- Interface: AccountRemovedUser
- Interface: CalculatePriceDataOptions
- Interface: CartShared
- Interface: CartViewed
- Interface: CheckoutStarted
- Interface: CheckoutStepCompleted
- Interface: CheckoutStepEvent
- Interface: CheckoutStepViewed
- Interface: CouponApplied
- Interface: CouponDenied
- Interface: CouponEntered
- Interface: CouponRemoved
- Interface: InviteSent
- Interface: OrderCancelled
- Interface: OrderCompleted
- Interface: OrderJourneyData
- Interface: OrderPriceData
- Interface: OrderRefunded
- Interface: OrderUpdated
- Interface: PaymentInfoEntered
- Interface: Product
- Interface: ProductAdded
- Interface: ProductAddedToWishlist
- Interface: ProductClicked
- Interface: ProductEvent
- Interface: ProductRemoved
- Interface: ProductRemovedFromWishlist
- Interface: ProductReviewed
- Interface: ProductShared
- Interface: ProductViewed
- Interface: SignedIn
- Interface: SignedOut
- Interface: SignedUp
- Interface: TrialEnded
- Interface: TrialStarted
- Interface: WishlistProductAddedToCart
- @causiq/sdk-events
@causiq/sdk-events / Exports
Causiq Semantic Events
Interfaces
@causiq/sdk-events / Exports / AccountAddedUser
Interface: AccountAddedUser
This event should be sent when a user accepted an invite into the team/product, and the user is added to the team/account/group.
Table of contents
Properties
Properties
accountId
• accountId: string
Team/group/account the user was added to.
role
• Optional
role: string
The user's role in the account.
userId
• userId: string
The id of the user being added to the team/group/account.
@causiq/sdk-events / Exports / AccountCreated
Interface: AccountCreated
This event should be sent when a new account is created.
Examples
causiq.track('Account Created', {
accountId: '123',
accountName: '@haf',
})
Table of contents
Properties
Properties
accountId
• accountId: string
The unique identifier of the account.
accountName
• accountName: string
The account's name
@causiq/sdk-events / Exports / AccountDeleted
Interface: AccountDeleted
This event should be sent when an account is deleted.
Table of contents
Properties
Properties
accountId
• accountId: string
The unique identifier of the account.
@causiq/sdk-events / Exports / AccountRemovedUser
Interface: AccountRemovedUser
Trigger this event when a user is removed from a team/group/account.
Table of contents
Properties
Properties
accountId
• accountId: string
Team/group/account the user was removed from.
userId
• userId: string
The id of the user being removed from the team/group/account.
@causiq/sdk-events / Exports / CalculatePriceDataOptions
Interface: CalculatePriceDataOptions
Option data type for the exported calculatePriceData
function.
Table of contents
Properties
Properties
currency
• Optional
currency: string
The currency of the order
discountPctInt
• Optional
discountPctInt: number
The discount in percent, e.g. 10 for 10%
shipping
• Optional
shipping: number
The shipping cost in the currency of the order
total
• total: number
Total price of the order including VAT
vatPctInt
• vatPctInt: number
The VAT in percent, e.g. 25 for 25%
@causiq/sdk-events / Exports / CartShared
Interface: CartShared
Trigger this event when a cart is shared.
Hierarchy
-
ShareData
↳
CartShared
Table of contents
Properties
Properties
cartId
• Optional
cartId: string
The Id of the cart that was shared
products
• products: Readonly
<{ productId
: string
}>[]
The product in the cart that was shared
recipient
• Optional
recipient: string
Recipient of the sharing
Inherited from
ShareData.recipient
shareMessage
• Optional
shareMessage: string
The message used to do the sharing
Inherited from
ShareData.shareMessage
shareVia
• shareVia: string
The method of sharing the product
Inherited from
ShareData.shareVia
@causiq/sdk-events / Exports / CartViewed
Interface: CartViewed
Track this event when the cart is viewed by the visitor.
Additional Properties
true
Table of contents
Properties
Properties
cartId
• cartId: string
The cart that was viewed
products
• products: Product
[]
The array of products that were in the cart
@causiq/sdk-events / Exports / CheckoutStarted
Interface: CheckoutStarted
Track this event when the checkout process is started; e.g. the page or model that is viewed when the visitor starts the checkout process.
Hierarchy
-
↳
CheckoutStarted
Table of contents
Properties
Properties
affiliation
• Optional
affiliation: string
Store or affiliation from which this transaction occurred (for example, Google Store)
Inherited from
cartId
• Optional
cartId: string
An optional cart id, this order was created from.
coupon
• Optional
coupon: string
E.g. ERIKA2021Q3
Inherited from
currency
• currency: string
Currency code associated with the transaction
Inherited from
discount
• Optional
discount: number
Total discount amount on the (subtotal + tax) associated with the transaction. So for example, if the customer has a 10% discount on the order, and the subtotal is €100, taxes are €25, the discount is 12.5€.
Example
2.5
Inherited from
orderId
• orderId: string
Order Id. Also used for deduplication.
Example
'50314b8e9bcf000000000000'
Inherited from
products
• Optional
products: Product
[]
Products in the order (line items)
Inherited from
shipping
• Optional
shipping: number
Shipping cost associated with the transaction
Example
3
Inherited from
subtotal
• Optional
subtotal: number
Order total after discounts but before taxes (excl VAT) and before shipping
Example
22.50
Inherited from
tax
• Optional
tax: number
Total amount tax or VAT associated with the transaction
Example
5.63
Inherited from
total
• total: number
Revenue (€) with discounts and coupons added in.
For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied.
Example
27.50
Inherited from
@causiq/sdk-events / Exports / CheckoutStepCompleted
Interface: CheckoutStepCompleted
Track this event when a checkout step is completed.
Example
causiq.track('Checkout Step Completed', {
checkoutId: '50314b8e9bcf000000000000',
step: 3,
shippingMethod: 'Fedex',
paymentMethod: 'Visa'
})
Hierarchy
-
↳
CheckoutStepCompleted
Table of contents
Properties
Properties
checkoutId
• Optional
checkoutId: string
Checkout Id
Inherited from
name
• Optional
name: string
Optional name of the step.
Inherited from
paymentMethod
• Optional
paymentMethod: string
Which payment method was selected?
Inherited from
CheckoutStepEvent.paymentMethod
shippingMethod
• Optional
shippingMethod: string
Which shipping method was selected?
Inherited from
CheckoutStepEvent.shippingMethod
step
• step: number
Number representing a step in the checkout process
Inherited from
@causiq/sdk-events / Exports / CheckoutStepEvent
Interface: CheckoutStepEvent
A DTO for the checkout data.
Additional Properties
true
Hierarchy
-
CheckoutStepEvent
Table of contents
Properties
Properties
checkoutId
• Optional
checkoutId: string
Checkout Id
name
• Optional
name: string
Optional name of the step.
paymentMethod
• Optional
paymentMethod: string
Which payment method was selected?
shippingMethod
• Optional
shippingMethod: string
Which shipping method was selected?
step
• step: number
Number representing a step in the checkout process
@causiq/sdk-events / Exports / CheckoutStepViewed
Interface: CheckoutStepViewed
Track this event when the checkout process is in progress and the customer has progressed one step.
Example
causiq.track('Checkout Step Viewed', {
checkoutId: '50314b8e9bcf000000000000',
step: 2,
shippingMethod: 'Fedex',
paymentMethod: 'Visa'
})
Hierarchy
-
↳
CheckoutStepViewed
Table of contents
Properties
Properties
checkoutId
• Optional
checkoutId: string
Checkout Id
Inherited from
name
• Optional
name: string
Optional name of the step.
Inherited from
paymentMethod
• Optional
paymentMethod: string
Which payment method was selected?
Inherited from
CheckoutStepEvent.paymentMethod
shippingMethod
• Optional
shippingMethod: string
Which shipping method was selected?
Inherited from
CheckoutStepEvent.shippingMethod
step
• step: number
Number representing a step in the checkout process
Inherited from
@causiq/sdk-events / Exports / CouponApplied
Interface: CouponApplied
Trigger this event whenever a coupon is successfully applied either on a cart or on an order/transaction.
Hierarchy
-
CouponData
↳
CouponApplied
Table of contents
Properties
Properties
cartId
• Optional
cartId: string
The cart id of the cart that the coupon was applied to
Inherited from
CouponData.cartId
coupon
• coupon: string
The coupon code that was entered
Inherited from
CouponData.coupon
couponName
• Optional
couponName: string
Coupon friendly name
discount
• Optional
discount: number
Monetary discount applied through the coupon
orderId
• Optional
orderId: string
Optional order id that the coupon was applied to
Inherited from
CouponData.orderId
@causiq/sdk-events / Exports / CouponDenied
Interface: CouponDenied
Trigger this event whenever a coupon is unsuccessfully applied either on a cart or on an order/transaction.
Hierarchy
-
CouponData
↳
CouponDenied
Table of contents
Properties
Properties
cartId
• Optional
cartId: string
The cart id of the cart that the coupon was applied to
Inherited from
CouponData.cartId
coupon
• coupon: string
The coupon code that was entered
Inherited from
CouponData.coupon
orderId
• Optional
orderId: string
Optional order id that the coupon was applied to
Inherited from
CouponData.orderId
reason
• reason: string
The reason why the coupon was denied
@causiq/sdk-events / Exports / CouponEntered
Interface: CouponEntered
Trigger this event whenever a coupon is entered either on a cart or on an order/transaction.
Alternatively, you can also use the Order Completed
event and pass the coupon code in the coupon
property.
Example
this.causiq.track('Coupon Entered', {
cartId: '456',
orderId: '123',
coupon: 'ERIKA2021Q3',
})
Hierarchy
-
CouponData
↳
CouponEntered
Table of contents
Properties
Properties
cartId
• Optional
cartId: string
The cart id of the cart that the coupon was applied to
Inherited from
CouponData.cartId
coupon
• coupon: string
The coupon code that was entered
Inherited from
CouponData.coupon
orderId
• Optional
orderId: string
Optional order id that the coupon was applied to
Inherited from
CouponData.orderId
@causiq/sdk-events / Exports / CouponRemoved
Interface: CouponRemoved
Hierarchy
-
CouponData
↳
CouponRemoved
Table of contents
Properties
Properties
cartId
• Optional
cartId: string
The cart id of the cart that the coupon was applied to
Inherited from
CouponData.cartId
coupon
• coupon: string
The coupon code that was entered
Inherited from
CouponData.coupon
couponName
• Optional
couponName: string
Coupon friendly name
discount
• Optional
discount: number
Monetary discount applied through the coupon
orderId
• Optional
orderId: string
Optional order id that the coupon was applied to
Inherited from
CouponData.orderId
@causiq/sdk-events / Exports / InviteSent
Interface: InviteSent
This event should be sent when a user is invited into the team/product.
Table of contents
Properties
Properties
accountId
• Optional
accountId: string
The id of the account the person is being invited to.
inviteeEmail
• Optional
inviteeEmail: string
The email address of the person being invited.
inviteeName
• Optional
inviteeName: string
The name of the person being invited.
inviteeRole
• Optional
inviteeRole: string
The invitee will receive this role when the invite is accepted.
@causiq/sdk-events / Exports / OrderCancelled
Interface: OrderCancelled
Trigger this even when the order was cancelled.
Hierarchy
-
↳
OrderCancelled
Table of contents
Properties
Properties
affiliation
• Optional
affiliation: string
Store or affiliation from which this transaction occurred (for example, Google Store)
Inherited from
coupon
• Optional
coupon: string
E.g. ERIKA2021Q3
Inherited from
currency
• currency: string
Currency code associated with the transaction
Inherited from
discount
• Optional
discount: number
Total discount amount on the (subtotal + tax) associated with the transaction. So for example, if the customer has a 10% discount on the order, and the subtotal is €100, taxes are €25, the discount is 12.5€.
Example
2.5
Inherited from
orderId
• orderId: string
Order Id. Also used for deduplication.
Example
'50314b8e9bcf000000000000'
Inherited from
products
• Optional
products: Product
[]
Products in the order (line items)
Inherited from
shipping
• Optional
shipping: number
Shipping cost associated with the transaction
Example
3
Inherited from
subtotal
• Optional
subtotal: number
Order total after discounts but before taxes (excl VAT) and before shipping
Example
22.50
Inherited from
tax
• Optional
tax: number
Total amount tax or VAT associated with the transaction
Example
5.63
Inherited from
total
• total: number
Revenue (€) with discounts and coupons added in.
For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied.
Example
27.50
Inherited from
@causiq/sdk-events / Exports / OrderCompleted
Interface: OrderCompleted
This data object details how to track orders in the e-commerce funnel.
The key to get right is the pricing structure. Here's a code example of how to calculate from a cart, given the total, the VAT in percent, and the discount in percent:
export function calculatePriceData({
total,
vatPctInt,
shipping = 0.0,
discountPctInt = 0,
currency = 'EUR',
}: CalculatePriceDataOptions): OrderPriceData {
const subtotal = total / (1 + vatPctInt / 100)
shipping = shipping || 0
const tax = total - total / (1 + vatPctInt / 100)
const discount = discountPctInt / 100 * (subtotal + tax)
return { subtotal, shipping, tax, discount, total, currency }
}
used like so:
causiq.track('Order Completed', {
checkoutId: '456',
orderId: '123',
products: [
{
productId: '123',
sku: '123',
name: 'Product 1',
price: 10,
salesPrice: 8, // 8*3 = 24 EUR excl VAT
quantity: 3,
category: 'Category 1',
url: 'https://example.com/product-1',
imageUrl: 'https://example.com/product-1.jpg',
},
],
...calculatePriceData({
total: 27,
vatPctInt: 25,
discountPctInt: 10,
shipping: 3,
currency: 'EUR',
}),
coupon: 'ERIKA2021Q3',
})
Or alternatively, if you want to pass data straight in:
causiq.track('Order Completed', {
checkoutId: '456',
orderId: '123',
products: [ ... ], // see above
subtotal: 24, // sum of sales prices of all products * quantity
tax: 6, // VAT or sales tax
discount: 3, // 10% discount on the subtotal+tax (because this is what customers expect)
total: 27, // subtotal + tax - discount = 24 + 6 - 3 = 27
currency: 'EUR',
coupon: 'ERIKA2021Q3',
})
Hierarchy
-
↳
OrderCompleted
Table of contents
Properties
Properties
affiliation
• Optional
affiliation: string
Store or affiliation from which this transaction occurred (for example, Google Store)
Inherited from
checkoutId
• Optional
checkoutId: string
Checkout Id
coupon
• Optional
coupon: string
E.g. ERIKA2021Q3
Inherited from
currency
• currency: string
Currency code associated with the transaction
Inherited from
discount
• Optional
discount: number
Total discount amount on the (subtotal + tax) associated with the transaction. So for example, if the customer has a 10% discount on the order, and the subtotal is €100, taxes are €25, the discount is 12.5€.
Example
2.5
Inherited from
orderId
• orderId: string
Order Id. Also used for deduplication.
Example
'50314b8e9bcf000000000000'
Inherited from
products
• Optional
products: Product
[]
Products in the order (line items)
Inherited from
shipping
• Optional
shipping: number
Shipping cost associated with the transaction
Example
3
Inherited from
subtotal
• Optional
subtotal: number
Order total after discounts but before taxes (excl VAT) and before shipping
Example
22.50
Inherited from
tax
• Optional
tax: number
Total amount tax or VAT associated with the transaction
Example
5.63
Inherited from
total
• total: number
Revenue (€) with discounts and coupons added in.
For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied.
Example
27.50
Inherited from
@causiq/sdk-events / Exports / OrderJourneyData
Interface: OrderJourneyData
Data related to the order's steps
Additional Properties
true
Hierarchy
-
OrderJourneyData
Table of contents
Properties
Properties
affiliation
• Optional
affiliation: string
Store or affiliation from which this transaction occurred (for example, Google Store)
coupon
• Optional
coupon: string
E.g. ERIKA2021Q3
orderId
• orderId: string
Order Id. Also used for deduplication.
Example
'50314b8e9bcf000000000000'
products
• Optional
products: Product
[]
Products in the order (line items)
@causiq/sdk-events / Exports / OrderPriceData
Interface: OrderPriceData
A DTO for the price data. Used together with the Order- and Cart-specific events.
Hierarchy
-
OrderPriceData
Table of contents
Properties
Properties
currency
• currency: string
Currency code associated with the transaction
discount
• Optional
discount: number
Total discount amount on the (subtotal + tax) associated with the transaction. So for example, if the customer has a 10% discount on the order, and the subtotal is €100, taxes are €25, the discount is 12.5€.
Example
2.5
shipping
• Optional
shipping: number
Shipping cost associated with the transaction
Example
3
subtotal
• Optional
subtotal: number
Order total after discounts but before taxes (excl VAT) and before shipping
Example
22.50
tax
• Optional
tax: number
Total amount tax or VAT associated with the transaction
Example
5.63
total
• total: number
Revenue (€) with discounts and coupons added in.
For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied.
Example
27.50
@causiq/sdk-events / Exports / OrderRefunded
Interface: OrderRefunded
Trigger this event when an order has been refunded.
Hierarchy
-
↳
OrderRefunded
Table of contents
Properties
Properties
affiliation
• Optional
affiliation: string
Store or affiliation from which this transaction occurred (for example, Google Store)
Inherited from
coupon
• Optional
coupon: string
E.g. ERIKA2021Q3
Inherited from
currency
• currency: string
Currency code associated with the transaction
Inherited from
discount
• Optional
discount: number
Total discount amount on the (subtotal + tax) associated with the transaction. So for example, if the customer has a 10% discount on the order, and the subtotal is €100, taxes are €25, the discount is 12.5€.
Example
2.5
Inherited from
orderId
• orderId: string
Order Id. Also used for deduplication.
Example
'50314b8e9bcf000000000000'
Inherited from
products
• Optional
products: Product
[]
Products in the order (line items)
Inherited from
shipping
• Optional
shipping: number
Shipping cost associated with the transaction
Example
3
Inherited from
subtotal
• Optional
subtotal: number
Order total after discounts but before taxes (excl VAT) and before shipping
Example
22.50
Inherited from
tax
• Optional
tax: number
Total amount tax or VAT associated with the transaction
Example
5.63
Inherited from
total
• total: number
Revenue (€) with discounts and coupons added in.
For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied.
Example
27.50
Inherited from
@causiq/sdk-events / Exports / OrderUpdated
Interface: OrderUpdated
Track this event when the order was updated.
Hierarchy
-
↳
OrderUpdated
Table of contents
Properties
Properties
affiliation
• Optional
affiliation: string
Store or affiliation from which this transaction occurred (for example, Google Store)
Inherited from
coupon
• Optional
coupon: string
E.g. ERIKA2021Q3
Inherited from
currency
• currency: string
Currency code associated with the transaction
Inherited from
discount
• Optional
discount: number
Total discount amount on the (subtotal + tax) associated with the transaction. So for example, if the customer has a 10% discount on the order, and the subtotal is €100, taxes are €25, the discount is 12.5€.
Example
2.5
Inherited from
orderId
• orderId: string
Order Id. Also used for deduplication.
Example
'50314b8e9bcf000000000000'
Inherited from
products
• Optional
products: Product
[]
Products in the order (line items)
Inherited from
shipping
• Optional
shipping: number
Shipping cost associated with the transaction
Example
3
Inherited from
subtotal
• Optional
subtotal: number
Order total after discounts but before taxes (excl VAT) and before shipping
Example
22.50
Inherited from
tax
• Optional
tax: number
Total amount tax or VAT associated with the transaction
Example
5.63
Inherited from
total
• total: number
Revenue (€) with discounts and coupons added in.
For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied.
Example
27.50
Inherited from
@causiq/sdk-events / Exports / PaymentInfoEntered
Interface: PaymentInfoEntered
Track this event when the payment info has been successfully entered.
Hierarchy
-
↳
PaymentInfoEntered
Table of contents
Properties
Properties
checkoutId
• Optional
checkoutId: string
Checkout Id
Inherited from
name
• Optional
name: string
Optional name of the step.
Inherited from
orderId
• Optional
orderId: string
Optional order id.
paymentMethod
• Optional
paymentMethod: string
Which payment method was selected?
Inherited from
CheckoutStepEvent.paymentMethod
shippingMethod
• Optional
shippingMethod: string
Which shipping method was selected?
Inherited from
CheckoutStepEvent.shippingMethod
step
• step: number
Number representing a step in the checkout process
Inherited from
@causiq/sdk-events / Exports / Product
Interface: Product
Generic product DTO
Additional Properties
true
Hierarchy
-
Product
Table of contents
Properties
Properties
brand
• Optional
brand: string
If the product has a brand.
category
• Optional
category: string
Product category
imageUrl
• Optional
imageUrl: string
Image URL of product
name
• Optional
name: string
Human-readable name of the product
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
quantity
• quantity: number
How many items of this product are being bought?
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
sku
• Optional
sku: string
Sku of the product being viewed
url
• Optional
url: string
URL of product
variant
• Optional
variant: string
If the product has a variant.
@causiq/sdk-events / Exports / ProductAdded
Interface: ProductAdded
Track this event when a visitor adds a product to the cart.
Example
this.causiq.track('Product Added', {
cartId: '456',
productId: '123',
category: 'shoes',
name: 'Adidas Running Shoes',
brand: 'Adidas',
variant: 'black',
price: 100,
quantity: 1,
position: 2,
url: 'https://www.example.com/product/path',
imageUrl: 'https://www.example.com/product/path.jpg',
})
Hierarchy
-
↳
ProductAdded
Table of contents
Properties
- brand
- cartId
- category
- coupon
- imageUrl
- name
- position
- price
- productId
- quantity
- salesPrice
- sku
- url
- variant
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
cartId
• cartId: string
The cart this product was added to
category
• Optional
category: string
Product category
Inherited from
coupon
• Optional
coupon: string
Coupon code associated with the product
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
position
• Optional
position: number
Product position in the list, e.g. 3
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
@causiq/sdk-events / Exports / ProductAddedToWishlist
Interface: ProductAddedToWishlist
Track this event when a product is added to a wishlist.
Hierarchy
-
WishlistData
↳
ProductAddedToWishlist
Table of contents
Properties
- brand
- category
- imageUrl
- name
- price
- productId
- quantity
- salesPrice
- sku
- url
- variant
- wishlistId
- wishlistName
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
category
• Optional
category: string
Product category
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
wishlistId
• wishlistId: string
The wishlist id to which the product was added
Inherited from
WishlistData.wishlistId
wishlistName
• Optional
wishlistName: string
Optionally the name of the wishlist
Inherited from
WishlistData.wishlistName
@causiq/sdk-events / Exports / ProductClicked
Interface: ProductClicked
Track this event when a visitor taps a product.
Example
this.causiq.track('Product Clicked', {
productId: '123',
category: 'shoes',
name: 'Adidas Running Shoes',
brand: 'Adidas',
variant: 'black',
price: 100,
quantity: 1,
position: 1,
url: 'https://www.example.com/product/path',
imageUrl: 'https://www.example.com/product/path.jpg',
})
Hierarchy
-
↳
ProductClicked
Table of contents
Properties
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
category
• Optional
category: string
Product category
Inherited from
coupon
• Optional
coupon: string
Coupon code associated with the product
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
position
• Optional
position: number
Product position in the list, e.g. 3
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
@causiq/sdk-events / Exports / ProductEvent
Interface: ProductEvent
Internal base class for product events
Additional Properties
true
Hierarchy
-
↳
ProductEvent
↳↳
ProductAdded
Table of contents
Properties
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
category
• Optional
category: string
Product category
Inherited from
coupon
• Optional
coupon: string
Coupon code associated with the product
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
position
• Optional
position: number
Product position in the list, e.g. 3
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
@causiq/sdk-events / Exports / ProductRemoved
Interface: ProductRemoved
This this event when a product was removed from the cart.
Hierarchy
-
↳
ProductRemoved
Table of contents
Properties
- brand
- cartId
- category
- coupon
- imageUrl
- name
- position
- price
- productId
- quantity
- salesPrice
- sku
- url
- variant
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
cartId
• cartId: string
The cart this product was removed from
category
• Optional
category: string
Product category
Inherited from
coupon
• Optional
coupon: string
Coupon code associated with the product
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
position
• Optional
position: number
Product position in the list, e.g. 3
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
@causiq/sdk-events / Exports / ProductRemovedFromWishlist
Interface: ProductRemovedFromWishlist
Track this event when a product is removed from a wishlist.
Hierarchy
-
WishlistData
↳
ProductRemovedFromWishlist
Table of contents
Properties
- brand
- category
- imageUrl
- name
- price
- productId
- quantity
- salesPrice
- sku
- url
- variant
- wishlistId
- wishlistName
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
category
• Optional
category: string
Product category
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
wishlistId
• wishlistId: string
The wishlist id to which the product was added
Inherited from
WishlistData.wishlistId
wishlistName
• Optional
wishlistName: string
Optionally the name of the wishlist
Inherited from
WishlistData.wishlistName
@causiq/sdk-events / Exports / ProductReviewed
Interface: ProductReviewed
Trigger this event when a product is reviewed.
Table of contents
Properties
Properties
productId
• productId: string
The id of the product being reviewd
rating
• rating: number
The rating of the review
reviewBody
• Optional
reviewBody: string
The optional text body of the review
reviewId
• reviewId: string
The id of the review
@causiq/sdk-events / Exports / ProductShared
Interface: ProductShared
Trigger this event when a product is shared.
Hierarchy
-
ShareData
↳
ProductShared
Table of contents
Properties
- brand
- category
- imageUrl
- name
- price
- productId
- quantity
- recipient
- salesPrice
- shareMessage
- shareVia
- sku
- url
- variant
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
category
• Optional
category: string
Product category
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
recipient
• Optional
recipient: string
Recipient of the sharing
Inherited from
ShareData.recipient
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
shareMessage
• Optional
shareMessage: string
The message used to do the sharing
Inherited from
ShareData.shareMessage
shareVia
• shareVia: string
The method of sharing the product
Inherited from
ShareData.shareVia
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
@causiq/sdk-events / Exports / ProductViewed
Interface: ProductViewed
Track this event when a visitor views a product. Also trigger this if the visitor views a product variant on the product page.
Example
this.causiq.track('Product Viewed', {
productId: '123',
category: 'shoes',
name: 'Adidas Running Shoes',
brand: 'Adidas',
variant: 'black',
price: 100,
quantity: 1,
position: 2,
url: 'https://www.example.com/product/path',
imageUrl: 'https://www.example.com/product/path.jpg',
})
Hierarchy
-
↳
ProductViewed
Table of contents
Properties
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
category
• Optional
category: string
Product category
Inherited from
coupon
• Optional
coupon: string
Coupon code associated with the product
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
position
• Optional
position: number
Product position in the list, e.g. 3
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
@causiq/sdk-events / Exports / SignedIn
Interface: SignedIn
This event should be sent when a user signs in to your service.
Table of contents
Properties
Properties
accountId
• accountId: string
Globally unique identifier for the account. If it's a user-specific account, can be the same as userId.
userId
• userId: string
The id of the user signing in.
username
• Optional
username: string
The username of the user
@causiq/sdk-events / Exports / SignedOut
Interface: SignedOut
This event should be sent when a user signs out for your service. You should also call causiq.resetIdentity() to refresh the cookie when a Signed Out event occurs.
Table of contents
Properties
Properties
accountId
• accountId: string
Globally unique identifier for the account. If it's a user-specific account, can be the same as userId.
userId
• userId: string
The id of the user signing in.
username
• Optional
username: string
The username of the user
@causiq/sdk-events / Exports / SignedUp
Interface: SignedUp
This event should be sent when a user signs up for your service.
Example
causiq.track('Signed Up', {
type: 'invited',
accountId: '123',
firstName: 'Henrik',
lastName: 'Feldt',
email: 'henrik@causiq.com',
phone: '+46701234567',
username: '@haf',
title: 'CEO',
})
Table of contents
Properties
Properties
accountId
• accountId: string
Globally unique identifier for the signup/account.
• Optional
email: string
The user's email address
firstName
• Optional
firstName: string
The user's first name
lastName
• Optional
lastName: string
The user's last name
phone
• Optional
phone: string
The user's phone number
title
• Optional
title: string
The user's title
type
• type: string
username
• Optional
username: string
The username of this account
@causiq/sdk-events / Exports / TrialEnded
Interface: TrialEnded
This event should be sent when a trial stops.
Table of contents
Properties
Properties
accountId
• accountId: string
The account the trial is associated with.
endDateTime
• Optional
endDateTime: string
When the trial will end.
Format dates as ISO8601 in zulu time (e.g. 2023-01-01T14:31:00.021Z)
planName
• Optional
planName: string
The trial's plan name
startDateTime
• startDateTime: string
When the trial started.
Format dates as ISO8601 in zulu time (e.g. 2023-01-01T14:31:00.021Z)
@causiq/sdk-events / Exports / TrialStarted
Interface: TrialStarted
This event should be sent when the trial has been started.
Table of contents
Properties
Properties
accountId
• accountId: string
The account the trial is associated with.
endDateTime
• Optional
endDateTime: string
When the trial will end.
Format dates as ISO8601 in zulu time (e.g. 2023-01-01T14:31:00.021Z)
planName
• Optional
planName: string
The trial's plan name
startDateTime
• startDateTime: string
When the trial started.
Format dates as ISO8601 in zulu time (e.g. 2023-01-01T14:31:00.021Z)
@causiq/sdk-events / Exports / WishlistProductAddedToCart
Interface: WishlistProductAddedToCart
Track this event when a product in a wishlist is added to the cart.
Hierarchy
-
WishlistData
↳
WishlistProductAddedToCart
Table of contents
Properties
- brand
- cartId
- category
- imageUrl
- name
- price
- productId
- quantity
- salesPrice
- sku
- url
- variant
- wishlistId
- wishlistName
Properties
brand
• Optional
brand: string
If the product has a brand.
Inherited from
cartId
• cartId: string
The cart id to which the product was added
category
• Optional
category: string
Product category
Inherited from
imageUrl
• Optional
imageUrl: string
Image URL of product
Inherited from
name
• Optional
name: string
Human-readable name of the product
Inherited from
price
• price: number
The ordinary excl. VAT price of the product is it's being bought.
Inherited from
productId
• Optional
productId: string
Database id of the product (being bought, viewed, etc)
The sku and product_id don’t have to be different. If they are different: typically the product_id is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
Inherited from
quantity
• quantity: number
How many items of this product are being bought?
Inherited from
salesPrice
• Optional
salesPrice: number
Optional sales excl. VAT price of the product. In Order Completed, the sum of all products' salesPrice should be equal to the order's subtotal PLUS the discount (as the discount) is applied on the order, not the product.
Inherited from
sku
• Optional
sku: string
Sku of the product being viewed
Inherited from
url
• Optional
url: string
URL of product
Inherited from
variant
• Optional
variant: string
If the product has a variant.
Inherited from
wishlistId
• wishlistId: string
The wishlist id to which the product was added
Inherited from
WishlistData.wishlistId
wishlistName
• Optional
wishlistName: string
Optionally the name of the wishlist
Inherited from
WishlistData.wishlistName
@causiq/sdk-events / Exports
@causiq/sdk-events
Table of contents
Interfaces
- AccountAddedUser
- AccountCreated
- AccountDeleted
- AccountRemovedUser
- CalculatePriceDataOptions
- CartShared
- CartViewed
- CheckoutStarted
- CheckoutStepCompleted
- CheckoutStepEvent
- CheckoutStepViewed
- CouponApplied
- CouponDenied
- CouponEntered
- CouponRemoved
- InviteSent
- OrderCancelled
- OrderCompleted
- OrderJourneyData
- OrderPriceData
- OrderRefunded
- OrderUpdated
- PaymentInfoEntered
- Product
- ProductAdded
- ProductAddedToWishlist
- ProductClicked
- ProductEvent
- ProductRemoved
- ProductRemovedFromWishlist
- ProductReviewed
- ProductShared
- ProductViewed
- SignedIn
- SignedOut
- SignedUp
- TrialEnded
- TrialStarted
- WishlistProductAddedToCart
Type Aliases
Functions
Type Aliases
Currency
Ƭ Currency: "EUR"
| "USD"
| "SEK"
| string
EcommerceMessage
Ƭ EcommerceMessage: ProductClicked
| ProductViewed
| ProductAdded
| ProductRemoved
| CartViewed
| CheckoutStarted
| CheckoutStepViewed
| CheckoutStepCompleted
| PaymentInfoEntered
| OrderUpdated
| OrderCompleted
| OrderCancelled
| OrderRefunded
| CouponEntered
| CouponApplied
| CouponDenied
| CouponRemoved
| ProductAddedToWishlist
| ProductRemovedFromWishlist
| WishlistProductAddedToCart
| ProductShared
| CartShared
| ProductReviewed
These are the semantic tracking messages that we support for tracking e-commerce events with Causiq.
SaasMessage
Ƭ SaasMessage: AccountCreated
| AccountDeleted
| SignedUp
| SignedIn
| SignedOut
| InviteSent
| AccountAddedUser
| AccountRemovedUser
| TrialStarted
| TrialEnded
These are the semantic tracking messages that we support for tracking SaaS/app products with Causiq.
Functions
calculatePriceData
▸ calculatePriceData(__namedParameters
): OrderPriceData
Parameters
Name | Type |
---|---|
__namedParameters |
CalculatePriceDataOptions |