Skip to content

Get started with MarkTag REST API ​

This quickstart shows you how to use MarkTag REST API to send event.

Guide ​

Once you've successfully created your MarkTag container, proceed to these steps to send events to your tag container.

Server-to-Server events (backend integration) ​

Use this when you need to send events from your own backend (e.g. NestJS, Django, Rails) instead of a browser/app — for example prescription_received or payment_status events that only happen server-side.

You don't need the JS/Flutter/React Native SDK for this. Your backend makes a single HTTPS call to a dedicated endpoint that already has your tag id in the URL path.

Endpoint ​

POST /mark/:tagId

:tagId is your container identifier. MarkTag gives you the full URL to use.

How the muid is handled ​

Every event needs a muid (the unique id of the user). On a browser/app the SDK stores it in the _muid cookie; a backend doesn't have that cookie. So you send the user's email, phone, or deviceId instead, and the tag server resolves the muid for you:

  • If you send a muid, it's used directly.
  • If you send an email, phone, or deviceId (no muid), the server looks up the muid for that user (matching on any of the identifiers provided).
  • If no muid can be resolved (the user has never been identified on a client), the event is rejected with 404 and not recorded — an event without a muid is not useful.

So it is a single call — no separate identity/lookup step is required.

Request Body ​

js
{
  "email": "user@example.com",   // one of email / phone / deviceId (or muid) is required
  "phone": "+8801XXXXXXXXX",     // optional — another way to identify the user
  "event": "prescription_received",
  "event_source": "server",      // recommended, so these events are distinguishable
  // ...any event-specific fields (status, value, currency, prescription_id, ...)
}

Curl Example ​

bash
curl --location 'https://tag.your-domain.com/mark/<your-tag-id>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "user@example.com",
    "event": "payment_status",
    "event_source": "server",
    "status": "paid",
    "value": 113,
    "currency": "USD"
}'

Responses ​

StatusBodyMeaning
201{ "message": "Event accepted" }muid resolved (or supplied); event recorded
404{ "success": false, "message": "No muid found ..." }user not identified yet; event not recorded
400{ "success": false, "message": "muid, email, or deviceId is required." }no identifier supplied

INFO

Event-specific fields go at the top level of the body (not nested). They are stored with the event and available in reporting.

Optional: resolve a muid on its own ​

If you ever want just the muid without sending an event, use the lookup endpoint:

bash
curl --location 'https://tag.your-domain.com/id/<your-tag-id>' \
--header 'Content-Type: application/json' \
--data-raw '{ "email": "user@example.com" }'
# -> { "success": true, "muid": "a563d109-..." }   (muid is null if the user is unknown)

This is not required for sending events — POST /mark/:tagId already does it internally.


Pre-defined Events ​

The following event names and their event-specific fields are supported. Send them in the request body of POST /mark/:tagId alongside email and event (see the Server-to-Server section above). Event names are PascalCase.


View Content
Add this event code to each page of your site to track when a customer visits it. MarkTag automatically collects the page URL and page information ​

**

Schema ​

js
{
  event: "ViewContent",
  email: `<STRING: USER EMAIL>`; // Optional
  phone: `<STRING: USER PHONE NUMBER>`; // Optional
}

Example ​

js
 {
        event:"ViewContent",
        email: 'john@example.com',
        phone: '+13425784032',
    }

View Item

Add this event code to an item on your site to track when a customer clicks it to view details or add it to the item’s detail page. MarkTag automatically collects the page URL and page information. ​

**

Schema ​

js
 {
        event: 'ViewItem',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >, // Optional
        currency: <STRING: CURRENCY OF THE VALUE>, // Optional
        products: <Array of Product object>, // Optional
        content_event: <'product' | 'image' | 'video' | 'blog' | string> // Optional
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}
Example ​
js



 {
        event: 'ViewItem',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        content_event: 'product',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Login

Add this event to track a customer login. ​

**

Schema ​

js
 {
        event: 'Login',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
    }

Example ​

js
 {
          event: 'Login',
          email: 'john@example.com',
          phone: '+13425784032',
    }
Signup

Add this event to track a new customer signup ​

**

Schema ​

js
 {
        event: 'Signup',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
    }

Example ​

js
 {
          event: 'Signup',
          email: 'john@example.com',
          phone: '+13425784032',
    }
Complete Registration

Add this event to track when a customer completes registration. ​

**

Schema ​

js
 {
        event: 'CompleteRegistration',
        email: '<USER EMAIL>', // Optional
        phone: '<USER PHONE NUMBER>', // Optional
        // You can add additional key-value pairs
    }

Example ​

js
paload: {
          event: 'CompleteRegistration',
          email: 'john@example.com',
          phone: '+13425784032',
    }
Start Trial

Add this event to track when a customer starts a trial ​

**

Schema ​

js
{
        event: 'StartTrial',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >,
        currency: <STRING: CURRENCY OF THE VALUE>,
        products: <Array of Product object>,
    }

Product object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
   {
        event: 'StartTrial',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Add Payment Info

Add this event to track when a customer adds payment info. ​

**

Schema ​

js
 {
        event: 'AddPaymentInfo',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        payment_event: <STRING: event OF PAYMENT>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM>, // Optional
        currency: <NUMBER:CURRENCY OF VALUE>, //Optional
        products: <ARRAY of Product Object>, //Optional
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
{
        event: 'AddPaymentInfo',
        email: 'john@example.com',
        phone: "+13425784032",
        payment_event: "Credit Card"
        value: 40.00,
        currency: "USD",
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Add Shipping Info

Add this event to track when a customer adds shipping info ​

**

Schema ​

js
 {
        event: 'AddShippingInfo',
        email: '<STRING : USER EMAIL>', // Optional
        phone: '<STRING: USER PHONE NUMBER>', // Optional
        shipping_tier: 'STRING: <event OF SHIPPING>', // Optional
        value: <NUMBER: VALUE OF THIS ITEM>, // Optional
        currency: <STRING: CURRENCY OF VALUE>, //Optional
        products: <ARRAY of Product Object>, //Optional
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
 {
        event: 'AddShippingInfo',
        email: 'john@example.com',
        phone: '+13425784032',
        shipping_tier: 'GROUND',
        value: 40.00,
        currency: "USD",
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
View Cart

Add this event code to an item on your site to track when a customer views their cart. ​

**

Schema ​

js
{
        event: 'ViewCart',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >,
        currency: <STRING: CURRENCY OF THE VALUE>,
        products: <Array of Product object>,
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}
js
 {
        event: 'ViewCart',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Add To cart

Add this event code to an item on your site to track when a customer adds it to their cart. ​

**

Schema ​

js
 {
        event: 'AddToCart',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >,
        currency: <STRING: CURRENCY OF THE VALUE>,
        products: <Array of Product object>,
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Examples ​

js
 {
        event: 'AddToCart',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Add To Wishlist

Add this event code to an item on your site to track when a customer adds it to their wishlist. ​

**

Schema ​

js
{
        event: 'AddToWishlist',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >,
        currency: <STRING: CURRENCY OF THE VALUE>,
        products: <Array of Product object>,
    }

Example ​

js
 {
        event: 'AddToWishlist',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Remove From Cart

Add this event code to items in the cart on your site to track when a customer removes them from their cart. ​

**

Schema ​

js
 {
        event: 'RemoveFromCart',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >,
        currency: <STRING: CURRENCY OF THE VALUE>,
        products: <Array of Product object>,
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
{
        event: 'RemoveFromCart',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Begin Checkout

Add this event to your site to track when a customer begins to checkout. ​

**

Schema ​

js
paylaod: {
        event: 'BeginCheckout',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: TOTAL MONETARY VALUE OF THIS TRANSACTION >,
        currency: <STRING: 3 DIGIT CURRENCY CODE OF THE VALUE>,
        products: <Array of Product object>,
        shipping_cost: <NUMBER: SHIPPING COST>, // Optional
        tax: <NUMBER: TAX AMOUNT> // Optional
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
 {
        event: 'BeginCheckout',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Purchase

Add this event to track when a customer makes a purchase. ​

**

Schema ​

js
 {
        event: 'Purchase',
        email: <STRING: USER EMAIL> // Optional
        phone: <STRING: USER PHONE NUMBER> // Optional
        value: <NUMBER: TOTAL MONETARY VALUE OF THIS TRANSACTION >
        currency: <STRING: 3 DIGIT CURRENCY CODE OF THE VALUE>
        products: <Array of Product object>,
        shipping_cost: <NUMBER: SHIPPING COST> // Optional
        tax: <NUMBER: TAX AMOUNT> // Optional
        transaction_id: <STRING: UNIQUE ID OF THIS TRANSACTION> // Optional
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
 {
        event: 'Purchase',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        shipping_cost: 5.0,
        tax: 2.5,
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Refund

Add this event to track when a customer makes a refund. ​

**

Schema ​

js
{
        event: 'Refund',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: VALUE OF THIS ITEM >,
        currency: <STRING: CURRENCY OF THE VALUE>,
        products: <Array of Product object>,
        transaction_id:<STRING: UNIQUE ID OF THIS TRANSACTION> // Optional,
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
 {
        event: 'Refund',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
        transaction_id: 'TRS123',
        products: [
          {
            id: 'SKU-345',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "XL", color: "Blue" },
                price: { original: 10.0, discounted: 8.0, currency: "USD" },
                isAvailable: true
              },
              {
                attributes: { size: "M", color: "Blue" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's blue formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
          {
            id: 'SKU-346',
            name: 'Formal Shirt',
            category: "Apparel, Men's Clothing",
            variants: [
              {
                attributes: { size: "L", color: "White" },
                price: { original: 10.0, currency: "USD" },
                isAvailable: true
              }
            ],
            description: "Men's white formal shirt",
            quantity: 2,
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Search

Add this event to the search bar of your site to track when an user searches for term or product. ​

**

Schema ​

js
 {
        event: 'Search',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        item_id: <STRING: ITEM ID OF THE SHARED ITEM> // Optional
        search_term: <STRING: SEARCH TERM>, // Optional
    }

Example ​

js
 {
        event: 'Search',
        email: 'john@example.com',
        phone: '+13425784032',
        search_term: 'Flowers',
    }
Share

Add this event to share buttons on your site to track when an user share something from your site. ​

**

Schema ​

js
 {
        event: 'Share',
       email: <STRING: USER EMAIL>   , // Optional
       phone:<STRING: USER PHONE NUMBER>, // Optional
        item_id: <STRING: ITEM ID OF THE SHARED ITEM> // Optional
        share_method: <STRING: SHARE METHOD>, // Optional
    }

Example ​

js
 {
        event: 'Share',
        email: 'john@example.com',
        phone: '+13425784032',
        share_method: 'Facebook',
    }
Subscribe

Add this event to track when a customer subscribes to a plan. ​

**

Schema ​

js
paylad:{
        event: 'Subscribe',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: TOTAL MONETARY VALUE OF THIS TRANSACTION >,
        currency: <STRING: 3 DIGIT CURRENCY CODE OF THE VALUE>,
        products: <Array of Product object>,
    }

Product Object ​

js
{
  /** Required: Unique id of product */
  id: string;

  /** Optional: Product Name eg. "Shirt" */
  name: string;

  /** Optional: Product Category
   * eg. "Apparel" or "Apparel, Men's Clothing" */
  category: string;

  /** Optional: Array of variant objects.
    * The array itself is optional, but when provided, all fields within each variant are required (except price.discounted). */
  variants: Array<{
    attributes: Record<string, string>; // Required: key-value pairs eg. { size: "M", color: "red" }
    price: {
      original: number;    // Required: original price eg. 100.0
      discounted?: number; // Optional: discounted price
      currency: string;    // Required: currency code eg. "USD"
    };
    isAvailable: boolean;  // Required: whether this variant is available
  }>;

  /** Optional: Quantity of this product added to cart or purchased eg. 5 */
  quantity: number;

  /** Optional: Price of the Product eg. 7.59 */
  price: number;

  /** Optional: Description of the Product */
  description: string;

  /** Optional: Any coupon used through checkout */
  coupon: string;

  /** Optional: Any monetary discount added to the product
   * eg. if 5 USD discount is added, discount value should be 5.00.
   * If any percentage discount is added, you need to convert the percentage to monetary value*/
  discount: number;
}

Example ​

js
 {
        event: 'Subscribe',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 10.0,
        currency: 'USD',
        products: [
          {
            id: 'Plan-034',
            name: 'Premium',
            description: 'Unlimited Streaming',
            price: 10.0,
            coupon: 'HAPPY10',
            discount: 2.0,
          },
        ],
    }
Lead

Schema ​

Add this event to your lead form’s CTA button to track information when an user submits a lead form. ​

**

js
paylaod: {
        event: 'Lead',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
        value: <NUMBER: TOTAL MONETARY VALUE OF THIS LEAD >, // Optional
        currency: <STRING: 3 DIGIT CURRENCY CODE OF THE VALUE>, // Optional
    }

Example ​

js
  {
        event: 'Lead',
        email: 'john@example.com',
        phone: '+13425784032',
        value: 40.0,
        currency: 'USD',
    }
Submit Application

Add this event to your application form’s CTA button to track information when an user submits an application form. ​

**

Schema ​

js
 {
        event: 'SubmitApplication',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
        application_id: <STRING: UNIQUE ID OF THE APPLICATION>, // Optional
    }

Example ​

js
  {
        event: 'SubmitApplication',
        email: 'john@example.com',
        phone: '+13425784032',
    }
Contact

Add this event to a contact form to track when a customer wants to contact your business. ​

**

Schema ​

js
 {
        event: 'Contact',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
    }

Example ​

js
{
        event: 'Contact',
        email: 'john@example.com',
        phone: '+13425784032',
    }
Donate

Add this event to track when someone donates to your organization. ​

**

Schema ​

js
{
        event: 'Donate',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
    }

Example ​

js
 {
        event: 'Donate',
        email: 'john@example.com',
        phone: '+13425784032',
    }
Schedule

Add this event to track when someone schedules a call or meeting with your business. ​

**

js
 {
        event: 'Schedule',
        email: <STRING: USER EMAIL>, // Optional
        phone: <STRING: USER PHONE NUMBER>, // Optional
    }

Example ​

js
  {
        event: 'Schedule',
        email: 'john@example.com',
        phone: '+13425784032',
    }

Custom Events ​

Events not in the pre-defined list. They have no fixed payload schema and can be built with any custom parameters. Event names must be PascalCase, same as pre-defined events.

js
{
  "event": "ShareImage",
  "image_name": name,
  "full_text": text
}