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:
- Go to Shopify Admin → Online Store → Themes
- Click Actions → Edit Code
- Open
theme.liquidand paste the snippet before</head> - 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:
- Go to Shopify Admin → Online Store → Themes
- Click Customize
- Open App embeds in the sidebar
- Toggle on MRKT Mesh Tracking
- Save
The theme app extension is the recommended method — it stays in sync with updates and requires no code changes.
Events Captured
| Event | Trigger | Data Collected |
|---|---|---|
| page_view | Every page load | URL, referrer, title |
| view_item | Product page | Product ID, name, price, variant |
| add_to_cart | Add to cart click | Product, quantity, cart value |
| begin_checkout | Checkout start | Cart 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.