How to read tracking data on this site

This page is for anyone who adds or maintains a tracking script (Google Tag Manager, a tag vendor, or Salesforce Data 360 Website Connector) without access to the storefront source code. It explains what appears in the browser, when it is sent, and what shape it has, so you can subscribe, forward, or validate it against your schema.

It is listed under Playground documentation on the Guide hub—not a numbered step in the implementation sequence.


How to inspect (in the browser only)

  1. Open the storefront in Chrome (or any browser with DevTools).
  2. Go to Console and type:
    • window.dataLayer — array of objects (GTM/GA4 style).
    • window.sfWebInteractionsDataLayer — array used by the Data 360 Website Connector pattern on this site.
  3. Walk the user journey (home → product → add to cart → checkout → pay → confirmation) and note new entries after each step.

gtag may add extra objects to dataLayer (for example config and internal calls). Filter rows that have an event property when you map business events.


window.dataLayer — what, when, form

Objects are pushed in order. Many rows look like { event: "…", … }. Common event values on this site:

event (or role)When it typically appearsCommon payload shape / keys
page_viewInitial load of many URLs, and again when the user changes category filter on the homepage (URL query changes)page_title, page_location, page_path; on filtered home, may include category (category name).
product_viewProduct detail page load{ event: "product_view", ecommerce: { currency, value, items: [ { item_id, item_name, price, item_category?, … } ] } }
searchSearch results page when the URL contains a querysearch_term, results_count
login_successRight after a successful login, on the next page load (redirect)user_email
sign_up_successRight after successful registration, on the next page loaduser_email
view_item_listWhen the main product grid first shows (all products or a category)ecommerce.items[] with item_id, item_name, price, item_category, list metadata where set
view_itemProduct detail (GA4-style)ecommerce with items[] as above
view_cartUser opens the cart page (once per visit when cart has items)ecommerce with currency, value, items[]
add_to_cartUser adds a line to the cartecommerce with items[] (includes quantity)
remove_from_cartUser removes an item or sets quantity to zeroecommerce with items[]
begin_checkoutUser lands on checkout with a non-empty cartecommerce with cart line items
add_shipping_infoUser submits shipping details on checkoutecommerce (and optional shipping hints)
add_payment_infoUser clicks the simulated pay actionecommerce
purchaseAfter simulated payment and/or when the order confirmation screen loads with order linesecommerce with transaction_id, value, currency, items[]confirmation load is the reliable moment for final line items
view_search_resultsSearch results page (GA4-style)search_term and often ecommerce.items for shown products

Money: amounts are typically decimal numbers; currency is usually a string (e.g. PLN).


window.sfWebInteractionsDataLayer — what, when, form

Second array, same window. Used so Data 360–style connectors can read page types and events with an explicit flag.

Two recurring shapes:

A) Page typing

{ pageType: "<string>", sendEvent: true, contextualAttributes?: { ... } }

Examples of pageType you may see: home, category, product_detail, cart, checkout, search, search_results, order_confirmation, account, guide, error_page.
contextualAttributes may carry category_id, category_name, product_id, product_name, order_id, search_term, etc., depending on the page.

B) Event mirroring (GA4-aligned)

{ event: "<name>", sendEvent: true, ecommerce?: { ... }, search_term?: "..." }

Same event names as in the GA4 helpers for this site (e.g. view_item, add_to_cart, purchase, begin_checkout, view_search_results).
Login / sign-up may appear as:

{ event: "login" | "sign_up", method: "email", user_email: "...", sendEvent: true }

On a product page, you will often see both a pageType: "product_detail" row and an event: "view_item" row.


Custom browser events (window — not inside dataLayer)

These are DOM events on window. They are not pushed into dataLayer. Use them only if your integration listens with addEventListener.

Event nameWhenevent.detail
purchaseInDataLayerAfter a purchase payload is pushed to dataLayer on the order confirmation screenSame object as the push: { event: "purchase", ecommerce: { ... } }
cartUpdatedAfter add-to-cart, remove, or quantity change(empty — no payload)

There is no generic “something was pushed to dataLayer” event for every row—only purchaseInDataLayer for purchase on confirmation, plus cartUpdated for cart mutations.

Example:

window.addEventListener("purchaseInDataLayer", function (e) {
  var payload = e.detail;
  // payload.event === "purchase", payload.ecommerce has transaction_id, items, etc.
});

Practical checklist for your tracking script

  1. Decide whether you read dataLayer, sfWebInteractionsDataLayer, or both (connector docs usually describe the second).
  2. After each key user action, dump the last few array elements and match event / pageType to your web schema in Data Cloud or your tag triggers.
  3. For purchase, prefer the payload that appears when the order confirmation URL is shown; it includes final line items.
  4. If you need a hook in code without polling dataLayer, use purchaseInDataLayer for purchase only; for everything else, poll or use GTM triggers.