Analytics events

Use this page to get your funnel reporting correctly: what the SDK sends, when it sends it, what each payload carries, and the configuration mistakes that quietly produce wrong revenue numbers.

Enabling analytics

There is no default analytics setup and no meta tag creates one. Only window.nextConfig.analytics does. Without it, the page sends zero events and the only trace is one info log: Analytics disabled in configuration.

CODE
<script>
  window.nextConfig = {
    apiKey: '{YOUR_CAMPAIGN_API_KEY}',
    analytics: {
      enabled: true,
      mode: 'auto',
      debug: false,
      providers: {},
    },
  };
</script>

Providers are optional. With enabled: true and no providers, every event is still built, validated, and pushed to window.NextDataLayer. Providers are forwarders on top of that array, so your own script can read it and be the only consumer. mode: "auto" fires the view, cart, and checkout events from page activity. "manual" mode only switches those auto-trackers off: every next.track* method (trackViewItem, trackPurchase, trackCustomEvent, and the rest) still works and becomes your only source, with the same event names.

The debug overlay's Analytics panel lists every event with its per-provider delivery status, which is faster than reading the array by hand. Open it with ?debugger=true and see Debugger.

Verify in the console: window.NextDataLayer grows as you interact, and window.NextAnalytics.getStatus() reports initialized: true with the provider list.

Event names

Every name is exact. These are the strings that land in window.NextDataLayer, and the strings blockedEvents must match verbatim: "purchase" blocks nothing, "dl_purchase" does.

Everything in the four category tables below fires on its own once analytics is enabled. The two exceptions have their own sections: Fired only by your code, and Declared but never fired.

Commerce events

EventDescription
dl_view_item_listProduct list / collection impression
dl_view_itemProduct detail view
dl_select_itemProduct clicked from a list
dl_view_search_resultsSearch results viewed
dl_add_to_cartItem added to cart
dl_remove_from_cartItem removed from cart
dl_view_cartCart viewed
dl_begin_checkoutCheckout started
dl_add_shipping_infoShipping info added
dl_add_payment_infoPayment info added
dl_purchaseMain order purchase

Identity events

EventDescription
dl_user_dataUser + cart context (fired first)
dl_subscribeSubscription created

Post-purchase offer events

EventDescription
dl_viewed_upsellUpsell offer viewed
dl_skipped_upsellUpsell skipped
dl_upsell_purchaseAccepted upsell in GA4 purchase format

Cart, navigation, and engagement events

EventDescription
dl_cart_updatedCart contents changed
dl_package_swappedSelected package swapped
dl_page_viewPage view (SPA-aware)
dl_route_changedClient-side route change
dl_scroll_depthScroll-depth milestone
dl_exit_intent_shownExit-intent popup shown
dl_exit_intent_acceptedExit-intent offer accepted
dl_exit_intent_dismissedExit-intent popup dismissed
dl_exit_intent_closedExit-intent popup closed
dl_exit_intent_actionExit-intent custom action

Manual events

These two have no automatic trigger. Call the method and the SDK builds the event.

EventMethod
dl_sign_upnext.trackSignUp()
dl_loginnext.trackLogin()

Declared but never fired

These names are validated, provider-mapped, and blockable, but nothing in the SDK builds them. They exist so a page or a server-side tag can push them under the canonical name. A tag waiting on one waits forever.

EventDescription
dl_searchSearch performed (Meta Search)
dl_add_to_wishlistItem added to wishlist
dl_refundOrder refunded (adapter-mapped)
dl_view_promotionPromotion impression
dl_select_promotionPromotion clicked
dl_start_trialTrial started (Meta StartTrial)
dl_accepted_upsellUpsell accepted

For accepted upsells, track dl_upsell_purchase instead of dl_accepted_upsell.

Providers

Providers are forwarders on top of window.NextDataLayer. With analytics.enabled: true and none configured, every event is still built, validated, and pushed to that array, so your own script can read it and be the only consumer.

ProviderDescription
nextCampaignPage views only, to the campaign analytics platform
gtmEvery event, verbatim to window.dataLayer
facebook19 mapped events via fbq
rudderstack18 events renamed to the RudderStack spec
customEvery event, POSTed to your endpoint in batches

Each is configured under analytics.providers.<name>.

Required settings

ProviderRequired setting
nextCampaignthe campaign apiKey
gtmnothing
facebooksettings.pixelId
rudderstackthe page's rudderanalytics SDK
customsettings.endpoint

Renamed events

Two providers rename events on the way out. GTM and Custom send the canonical dl_* name.

Meta

CanonicalSent as
dl_purchasePurchase

RudderStack

CanonicalSent as
dl_purchaseOrder Completed

dl_upsell_purchase has no Meta mapping and is dropped, so upsell revenue never reaches Meta from the browser.

Each provider accepts blockedEvents: ["dl_page_view"] to suppress names it would otherwise forward. Matching is verbatim against the canonical name: "purchase" blocks nothing, "dl_purchase" does.

Manual tracking

next.trackCustomEvent(name, data) sends anything under your own name, and the track* methods cover standard events the SDK cannot see: an add-to-cart your own code performed, a hand-built checkout. The full method list, with the double-reporting warnings, is in the JavaScript API.

Cautions

  • The GTM provider does not load GTM. Its containerId setting is never read; enabling it only wires events to window.dataLayer. Without the GTM snippet on the page, events pile up in the array and nothing reports them. Add the container script yourself, the way the starter templates do in their base layout.
  • GTM pushes every event to two arrays. A tag listening on both dataLayer and ElevarDataLayer counts everything twice. Pick one.
  • NextCampaign fires its own extra page view on window load, in addition to the mapped dl_page_view, so expect two per page on that platform. It is also the one provider that loads a remote script, authenticated by your apiKey.
  • next-page-type decides which funnel step events land on. A missing or mistyped page type files the page's events under the wrong step. Set it on every page (Getting Started).
  • Do not hand-fire what auto mode already fires. trackPurchase on the receipt or trackBeginCheckout next to the built-in form doubles the numbers.

Payload reference

One section per event, with the payload it pushes to window.NextDataLayer.

Every payload below shows the fields the SDK actually populates. Item objects are typed by ProductSchema and the user_properties block by UserPropertiesSchema; both pages list the full set of fields the validator accepts, including ones no builder fills in.

Fields come from core/analytics/schemas/index.ts › eventSchemas where an event declares a schema. The rest are read from their builders, named in the section.

dl_view_item_list

Product list / collection impression.

CODE
{
  "event": "dl_view_item_list",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "item_list_id": "main",
    "item_list_name": "Bundles",
    "impressions": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_view_item

Product detail view.

CODE
{
  "event": "dl_view_item",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_select_item

Product clicked from a list.

CODE
{
  "event": "dl_select_item",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "item_list_id": "main",
    "item_list_name": "Bundles"
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_view_search_results

Search results viewed.

CODE
{
  "event": "dl_view_search_results",
  "search_term": "widget",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "item_list_name": "Bundles",
    "impressions": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_search

Search performed (Meta Search).

Nothing in the SDK builds this event, so it has no payload. Push it yourself under this exact name if your page needs it.

dl_add_to_cart

Item added to cart.

CODE
{
  "event": "dl_add_to_cart",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_remove_from_cart

Item removed from cart.

CODE
{
  "event": "dl_remove_from_cart",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_add_to_wishlist

Item added to wishlist.

Nothing in the SDK builds this event, so it has no payload. Push it yourself under this exact name if your page needs it.

dl_view_cart

Cart viewed.

CODE
{
  "event": "dl_view_cart",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_begin_checkout

Checkout started.

CODE
{
  "event": "dl_begin_checkout",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "checkout_id": "",
    "checkout_step": 0
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_add_shipping_info

Shipping info added.

CODE
{
  "event": "dl_add_shipping_info",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "shipping_tier": ""
  },
  "shipping_tier": "",
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_add_payment_info

Payment info added. Reported at whichever moment the shopper commits to the method they picked: for a card when the card fields are complete, for an express button when it is pressed, and for a method approved on the provider's own page (iDEAL, Klarna, SEPA Direct Debit and the rest) when the form is submitted, because nothing about paying was entered on your page. The card and form paths report once per page, so a second attempt after a refused order does not repeat it. An express button reports on every press.

CODE
{
  "event": "dl_add_payment_info",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "payment_type": ""
  },
  "payment_type": "",
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_purchase

Fires on the page opened with ?ref_id= that fetched a paid order: the success page, never the checkout page. Once per order, because the SDK remembers reported transaction_ids in localStorage, and every payment method (card, 3-D Secure, PayPal, Apple Pay, Google Pay) reports from the page the shopper lands on after payment completes.

  • Your success page must load the SDK and keep ?ref_id= on its URL. The SDK appends ref_id to the success URL itself, so this holds unless the page strips it or redirects somewhere the SDK is not installed. Confirm dl_purchase fires there once, with the real order number, before trusting any conversion count.
  • ecommerce.value is item revenue only. Tax and shipping are separate fields by design. A GA4 revenue figure that looks low against the store's own totals is usually this, not a lost event.
  • ecommerce.transaction_id is the order reference, the key every ad platform deduplicates on.
  • Zero-value orders report normally (value: 0 with a real transaction id). Full discounts and free trials count as conversions.
  • A failed redirect payment does not report. Both success_url and payment_failed_url come back carrying ?ref_id=, but nothing reports on the failure leg.
  • Meta deduplication needs storeName. With window.nextConfig.storeName set, the Meta event carries eventID: "{storeName}-{orderNumber}", which is what lets Meta deduplicate the browser event against a server-side copy of the same order.
CODE
{
  "event": "dl_purchase",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "transaction_id": "E2E-CARD-1",
    "affiliation": "acme",
    "tax": 4.95,
    "shipping": 7.95,
    "discount": 10
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_refund

Order refunded (adapter-mapped).

Nothing in the SDK builds this event, so it has no payload. Push it yourself under this exact name if your page needs it.

dl_view_promotion

Promotion impression.

Nothing in the SDK builds this event, so it has no payload. Push it yourself under this exact name if your page needs it.

dl_select_promotion

Promotion clicked.

Nothing in the SDK builds this event, so it has no payload. Push it yourself under this exact name if your page needs it.

dl_user_data

User + cart context (fired first).

CODE
{
  "event": "dl_user_data",
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  },
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "cart_contents": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ]
  }
}

dl_sign_up

Account sign-up.

CODE
{
  "event": "dl_sign_up",
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  },
  "method": ""
}

dl_login

Account login.

CODE
{
  "event": "dl_login",
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  },
  "method": ""
}

dl_subscribe

Subscription created.

CODE
{
  "event": "dl_subscribe",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "subscription_id": "SUB-1",
    "subscription_status": "active"
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_start_trial

Trial started (Meta StartTrial).

Nothing in the SDK builds this event, so it has no payload. Push it yourself under this exact name if your page needs it.

dl_viewed_upsell

Upsell offer viewed.

CODE
{
  "event": "dl_viewed_upsell",
  "order_id": "",
  "upsell": {
    "package_id": "",
    "package_name": "",
    "price": 29.99,
    "currency": "USD"
  }
}

dl_accepted_upsell

Upsell accepted.

CODE
{
  "event": "dl_accepted_upsell",
  "order_id": "",
  "upsell": {
    "package_id": "",
    "package_name": "",
    "quantity": 2,
    "value": 59.98,
    "currency": "USD"
  }
}

dl_skipped_upsell

Upsell skipped.

CODE
{
  "event": "dl_skipped_upsell",
  "order_id": "",
  "upsell": {
    "package_id": "",
    "package_name": ""
  }
}

dl_upsell_purchase

Accepted upsell in GA4 purchase format.

CODE
{
  "event": "dl_upsell_purchase",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "coupon": "SAVE10",
    "items": [
      {
        "item_id": "1",
        "item_name": "Widget",
        "currency": "USD",
        "discount": 10,
        "index": 0,
        "item_brand": "Acme",
        "item_category": "Widgets",
        "item_list_id": "main",
        "item_list_name": "Bundles",
        "item_variant": "Blue",
        "item_image": "https://cdn.example.com/widget.jpg",
        "price": 29.99,
        "quantity": 2,
        "item_product_id": "101",
        "item_sku": "WIDGET-BLU",
        "item_variant_id": "2001"
      }
    ],
    "transaction_id": "E2E-CARD-1",
    "affiliation": "acme",
    "tax": 4.95,
    "shipping": 7.95
  },
  "upsell_metadata": {
    "original_order_id": "",
    "upsell_number": 0,
    "package_id": "",
    "package_name": ""
  },
  "user_properties": {
    "visitor_type": "guest",
    "customer_id": "1001",
    "customer_email": "jordan@example.com",
    "customer_phone": "+15555550123",
    "customer_first_name": "Jordan",
    "customer_last_name": "Chen",
    "customer_address_city": "Ottawa",
    "customer_address_province": "Ontario",
    "customer_address_province_code": "ON",
    "customer_address_country": "Canada",
    "customer_address_country_code": "CA",
    "customer_address_zip": "K2P 2L8",
    "customer_order_count": 3,
    "customer_total_spent": 189.94,
    "customer_tags": "vip"
  }
}

dl_cart_updated

Cart contents changed.

CODE
{
  "event": "dl_cart_updated",
  "user_properties": {},
  "cart_total": "59.98",
  "ecommerce": {
    "currency": "USD",
    "value": 59.98,
    "items": []
  }
}

dl_package_swapped

Selected package swapped.

CODE
{
  "event": "dl_package_swapped",
  "ecommerce": {
    "currency": "USD",
    "items": []
  },
  "event_category": "ecommerce",
  "event_action": "swap",
  "event_label": "Widget \u2192 Widget 2-pack",
  "swap_details": {
    "previous_package_id": 1,
    "new_package_id": 2,
    "price_difference": 29.99
  }
}

dl_page_view

Page view (SPA-aware).

CODE
{
  "event": "dl_page_view",
  "page": {
    "title": "Checkout",
    "url": "https://shop.example.com/checkout/",
    "path": "/checkout/",
    "referrer": "https://shop.example.com/"
  }
}

dl_route_changed

Client-side route change.

CODE
{
  "event": "dl_route_changed",
  "route": {
    "from": "/checkout/",
    "to": "/upsell-1/",
    "path": "/upsell-1/"
  }
}

dl_scroll_depth

Scroll-depth milestone.

CODE
{
  "event": "dl_scroll_depth",
  "user_properties": {},
  "scroll_depth": 52,
  "scroll_threshold": 50,
  "page_height": 4200,
  "viewport_height": 900
}

dl_exit_intent_shown

Exit-intent popup shown.

CODE
{
  "event": "dl_exit_intent_shown",
  "event_category": "engagement",
  "event_action": "exit_intent_shown",
  "event_label": "exit-intent",
  "exit_intent": {
    "image_url": "https://cdn.example.com/offer.png",
    "template": ""
  }
}

dl_exit_intent_accepted

Exit-intent offer accepted.

CODE
{
  "event": "dl_exit_intent_accepted",
  "event_category": "engagement",
  "event_action": "exit_intent_accepted",
  "event_label": "exit-intent",
  "exit_intent": {
    "image_url": "https://cdn.example.com/offer.png",
    "template": ""
  }
}

dl_exit_intent_dismissed

Exit-intent popup dismissed.

CODE
{
  "event": "dl_exit_intent_dismissed",
  "event_category": "engagement",
  "event_action": "exit_intent_dismissed",
  "event_label": "exit-intent",
  "exit_intent": {
    "image_url": "https://cdn.example.com/offer.png",
    "template": ""
  }
}

dl_exit_intent_closed

Exit-intent popup closed.

CODE
{
  "event": "dl_exit_intent_closed",
  "event_category": "engagement",
  "event_action": "exit_intent_closed",
  "event_label": "exit-intent",
  "exit_intent": {
    "image_url": "https://cdn.example.com/offer.png",
    "template": ""
  }
}

dl_exit_intent_action

Exit-intent custom action.

CODE
{
  "event": "dl_exit_intent_action",
  "event_category": "engagement",
  "event_action": "exit_intent_accept",
  "event_label": "EXIT10",
  "exit_intent": {
    "action": "accept",
    "coupon_code": "EXIT10"
  }
}