Developer Guide
API GuideDeveloper Guide
  • Overview
    • Getting Started
    • Customers and Visitors
    • Events and Business Objects (BOs)
      • Sample Event Templates
  • Website
    • Getting Started
      • Direct JS Implementation
      • JS Integration via GTM
      • Tracking Haravan website events
    • Tracking Users
    • Tracking Events
      • [Direct] Sample E-Commerce Events
        • View Product
        • Add a Product to the Shopping Cart
        • View the Shopping Cart
        • Remove a Product from the Shopping Cart
        • Search for Product(s)
        • Checkout Shopping Cart
        • Apply Promotion Code
        • Purchase Product(s)
      • [GTM] Sample E-Commerce Events
        • View Product
        • Add a Product to the Shopping Cart
        • View the Shopping Cart
        • Remove a Product from the Shopping Cart
        • Search for Product(s)
        • Checkout Shopping Cart
        • Apply Promotion Code
        • Purchase Product(s)
    • Web Push
  • Android
    • Getting Started
    • Tracking Users
    • Tracking Events
    • Push Messaging
    • App Inbox Messaging
  • iOS
    • Getting Started
      • Integration of Antsomi iOS SDK
    • Tracking Users
    • Tracking Events
    • Push Messaging
  • Hybrid Apps
    • React Native
      • Tracking Users
      • Tracking Events
        • Sample E-Commerce Events
          • View Product
          • Add a Product to the Shopping Cart
          • View the Shopping Cart
          • Remove a Product from the Shopping Cart
          • Search for Product(s)
          • Checkout Shopping Cart
          • Apply Promotion Code
          • Purchase Product(s)
      • Push Messaging
      • App Inbox Messaging
    • Flutter
      • Tracking Users
      • Tracking Events
        • Sample E-Commerce Events
          • View Product
          • Add a Product to the Shopping Cart
          • View the Shopping Cart
          • Remove a Product from the Shopping Cart
          • Search for Product(s)
          • Checkout Shopping Cart
          • Purchase Product(s)
      • Push Messaging
      • App Inbox Messaging
      • App In-line Content
  • Antsomi Service Integrations
    • Media Template
    • Media JSON
      • Sample E-Commerce Events
        • Search for Product(s)
        • View Product
        • Add a Product to the Shopping Cart
        • Checkout Shopping Cart
        • Purchase Product(s)
      • Sample User Events
        • Sign-in
        • Sign-up
      • Sample Opt-in Events
        • Subscribe to Email marketing
        • Subscribe to OneSignal channel
  • 3rd Party Integrations
    • Shopify
      • Tracking Shopify website events
    • LINE
      • Integrating LINE Login with your web app
    • Google Ad Manager
      • Targeting CDP365 segment via PPID(s)
Powered by GitBook
On this page
  • Create the Antsomi Pixel tag
  • 1. Purchase Variables option 'Single Entry'
  • 2. Purchase Variables option 'Array-JSON Payload'
  1. Website
  2. Tracking Events
  3. [GTM] Sample E-Commerce Events

Purchase Product(s)

When users successfully complete a purchase of one or more products on your website, marking a conversion point in the user journey and indicating a successful transaction.

PreviousApply Promotion CodeNextWeb Push

Last updated 1 year ago

Create the Antsomi Pixel tag

In workspace > Tags > News > Antsomi pixel template

1. Purchase Variables option 'Single Entry'

Listing example variables

  • {{CDP - Data - Purchase - Items}}

[{"id":"WSH11","name":"Ina Compression Short","sale_price":49,"quantity":1,"line_item_quantity":49,"line_item_unit_price":49,"line_item_discount_amount":0,"line_item_rounded_amount":49}]
Name key in Json Variable
Description

id

Product selected variant SKU. Required (*)

name

Product name. Required (*)

sale_price

Product price.

quantity

The amount of product that’s being added to the shopping cart.

line_item_quantity

The amount of product that’s being purchased.

line_item_sale_price

The product line's on page sale price (multiplied with quantity).

line_item_discount_amount

The product line’s discount amount (multiplied with quantity).

line_item_rounded_amount

The product line’s final price i.e. the amount that the customer must pay (multiplied with quantity).

  • Example Variables for Purchase

Name Variable
Description
Example

{{CDP - Data - Purchase - ID}}

The order ID.

000003644

{{CDP - Data - Purchase - Name}}

The order ID.

000003644

{{CDP - Data - Purchase - Subtotal Amount}}

The order’s subtotal amount (sum of the product line item’s final price).

54

{{CDP - Data - Purchase - Discount Amount}}

The order’s total discount amount (sum of all line item discount amounts and the order discount amount).

0

{{CDP - Data - Purchase - Shipping Amount}}

The order’s shipping amount.

5

{{CDP - Data - Purchase - Tax Amount}}

The order’s tax amount.

0

{{CDP - Data - Purchase - Total Amount}}

The order’s total amount (sum of the subtotal amount, shipping amount, and tax subtracted from the discount amount).

54

{{CDP - Data - Purchase - Revenue}}

The order’s revenue (the final amount the customer must pay for).

54

{{CDP - Data - Purchase - Promotion Code}}

The order’s applied promotion code (leave it empty if no code is applied).

ANT250OFF

{{CDP - Data - Purchase - Shipping Name}}

The shipping customer’s full name.

Abcd

{{CDP - Data - Purchase - Shipping Address}}

The shipping customer’s street address.

123 abc, Binh Thanh, HCM

{{CDP - Data - Purchase - Shipping Phone}}

The shipping customers’ phone number.

098xxxx

{{CDP - Data - Purchase - Shipping Method}}

The order’s shipping method.

ABC Post

{{CDP - Data - Purchase - Payment Method}}

The order’s payment method.

Ship COD

{{CDP - Data - Purchase - Customer ID}}

The customer ID.

4564

{{CDP - Data - Purchase - Customer Name}}

The customer's full name.

Abcd

{{CDP - Data - Purchase - Customer Email}}

The customer’s email address.

abcd@example.com

{{CDP - Data - Purchase - Customer Phone}}

The customer’s phone number.

098xxxx

  • Example Variables for Customer

Name Variable
Description
Example

{{CDP - Data - Customer - ID}}

The customer ID. Required (*)

4564

{{CDP - Data - Customer - Name}}

The identified user’s full name. Required (*)

Abcd

{{CDP - Data - Customer - Email}}

The identified user’s email in lowercase.

abcd@example.com

{{CDP - Data - Customer - Phone}}

The formatted user’s phone.

098xxxx

2. Purchase Variables option 'Array-JSON Payload'

Listing example variables

  • {{CDP - Data - Purchase - Items}}

[{"id":"WSH11","name":"Ina Compression Short","sale_price":49,"quantity":1,"line_item_quantity":49,"line_item_unit_price":49,"line_item_discount_amount":0,"line_item_rounded_amount":49}]
Name key in Json Variable
Description

id

Product selected variant SKU. Required (*)

name

Product name. Required (*)

sale_price

Product price.

quantity

The amount of product that’s being added to the shopping cart.

line_item_quantity

The amount of product that’s being purchased.

line_item_sale_price

The product line's on page sale price (multiplied with quantity).

line_item_discount_amount

The product line’s discount amount (multiplied with quantity).

line_item_rounded_amount

The product line’s final price i.e. the amount that the customer must pay (multiplied with quantity).

  • {{CDP - Data - Purchase}}

{"id":"000003644","name":"000003644","subtotal_amount":54,"discount_amount":0,"shipping_amount":5,"tax_amount":0,"total_amount":54,"revenue":54,"promotion_code":"","customer_id":"4564","customer_name":"Abcd","customer_email":"abcd@example.com","customer_phone":"098xxxx","shipping_name":"Abcd","shipping_address":"123 abc, Binh Thanh, HCM","shipping_phone":"098xxxx","shipping_method":"ABC Post","payment_method":"COD"}
Name key in Json Variable
Description

id

The order ID.

name

The order ID.

subtotal_amount

The order’s subtotal amount (sum of the product line item’s final price).

discount_amount

The order’s total discount amount (sum of all line item discount amounts and the order discount amount).

shipping_amount

The order’s shipping amount.

tax_amount

The order’s tax amount.

total_amount

The order’s total amount (sum of the subtotal amount, shipping amount, and tax subtracted from the discount amount).

revenue

The order’s revenue (the final amount the customer must pay for).

promotion_code

The order’s applied promotion code (leave it empty if no code is applied).

customer_id

The customer ID.

customer_name

The customer's full name.

customer_email

The customer’s email address.

customer_phone

The customer’s phone number.

shipping_name

The shipping customer’s full name.

shipping_address

The shipping customer’s street address.

shipping_phone

The shipping customers’ phone number.

shipping_method

The order’s shipping method.

payment_method

The order’s payment method.

  • {CDP - Data - Customer}}

{"customer_id":"4564","phone":"098xxxx","name":"Abcd","email":"abcd@example.com"}
Name
Description

customer_id

The customer ID. Required (*)

name

The identified user’s full name. Required (*)

phone

The formatted user’s phone.

email

The identified user’s email in lowercase.

Purchase Product(s)
Choose Antsomi pixel template
Purchase tag GTM - Purchase Variables option 'Single Entry'
Purchase tag GTM - Purchase Variables option 'Array-JSON Payload'