Data Layer Installation

Add the MRKT Mesh tracking script to your Shopify storefront.

Overview

The MRKT Mesh data layer is a lightweight JavaScript snippet that captures browser-side events (page views, product views, add-to-cart, and checkout actions) and sends them to your MRKT Mesh endpoint for server-side delivery.

Installation Methods

Option A: Theme Liquid (Manual)

Copy the tracking snippet from My Tracking → Installation and paste it into your theme:

  1. Go to Shopify Admin → Online Store → Themes
  2. Click Actions → Edit Code
  3. Open theme.liquid and paste the snippet before </head>
  4. Save the file

Option B: Theme App Extension (No-Code)

If you installed via the Shopify App Store, the MRKT Mesh theme extension is available automatically:

  1. Go to Shopify Admin → Online Store → Themes
  2. Click Customize
  3. Open App embeds in the sidebar
  4. Toggle on MRKT Mesh Tracking
  5. Save
The theme app extension is the recommended method — it stays in sync with updates and requires no code changes.

Events Captured

EventTriggerData Collected
page_viewEvery page loadURL, referrer, title
view_itemProduct pageProduct ID, name, price, variant
add_to_cartAdd to cart clickProduct, quantity, cart value
begin_checkoutCheckout startCart items, total value

Verifying the Script

After installation, open your store in a browser and check the Network tab in DevTools. You should see requests to your MRKT Mesh tracking endpoint. See Verifying Your Setup for detailed steps.