The website tracking script connects what people do on your site to their subscriber profile, powering the website triggers: website visit, product viewed and custom events.
Install the script
- Set up your tracking domain under Settings (a subdomain like
track.yourstore.compointed at the platform - this keeps tracking under your own brand) - Copy your tracking code from Settings
- Paste it into your site's
<head>on every page (in Shopify: the theme layout; in WordPress: your theme header or a header scripts plugin)
The script is lightweight and loads asynchronously - it does not slow your page down.
Who gets tracked
Events are connected to identified subscribers. A visitor becomes identified when they arrive through a link in one of your emails, or submit one of your signup forms. Anonymous visitors are not matched to profiles, so website triggers only fire for people who exist as subscribers.
A click from one of your emails is treated as the most recent proof of who is using the browser: if a different address was identified there earlier (a shared computer, for example), the click takes over. A visitor identified by your own code or a login, for example through the WooCommerce plugin, is identified by that address on every page.
A session is one browser, not one tab. Links opened in new tabs stay in the same session, and a new session starts after 30 minutes without activity.
Product view tracking
On product pages, send a product_view event with the product's data so the Product viewed trigger can fire:
product_id,name,price,categoryandurldescribe the product- The trigger can filter on product ID and category, and can require a minimum number of views inside a window (for example 4 views in 7 days)
On Shopify and WooCommerce, product view events are part of the store integration setup.
Custom events
You can send any event from your site or backend ("booked_demo", "downloaded_guide") and start automations from the Custom event trigger. Event properties are available as merge tags in the flow's emails: a plan property becomes {{plan}}.
Technical details, payload formats and code examples live in the developer docs: website tracking API.
Profile properties from visits
The script also reports the page language (<html lang>) and the browser language with every event. Under Settings, Website tracking, Profile properties from website visits you can turn these into custom field values on identified visitors, for example Language = page language, always update. The rules run on every page view, so a subscriber who reads your site in Estonian ends up with Language = ET and can be segmented on it.
To set a property from your own code, call mp('set', { Language: 'ET' }) after the visitor is identified. Only custom fields that exist on the subscriber's list are written. See profile property rules.
Verifying it works
- Open your site through a link in a test email (so your visit is identified)
- Browse a product page a few times
- Check the subscriber's activity in the dashboard - events appear on the profile
Privacy
Tracking runs under your domain and only ties behavior to people who gave you their email address. Mention website tracking in your privacy policy, and gate the script behind your cookie consent solution where required.