Login
ZappushZappush Docs
Get started

Install the tracker

Add the Zappush tracking script to your site so it can capture shopper events, and confirm it is live.

The tracker is a small script that captures what shoppers do on your store: page views, product views, cart actions, and checkouts. On Shopify it is installed for you automatically. On every other platform you add one snippet.

1. Copy your tracking script

  1. In the dashboard, go to Settings → Install.
  2. You will see your tracking script. It looks like this, with your own key in place of your-key:
<script>!function(w,z){z=w.zappush=w.zappush||{};z.q=z.q||[];z.track=z.track||function(e,d){z.q.push([e,d])}}(window)</script>
<script src="https://api.zappush.com/s/your-key.js" defer></script>
  1. Click Copy. Always copy the exact snippet from this screen rather than the example above, since the key is unique to your store.

The small inline block lets Zappush capture events fired before the tracker finishes loading. Paste both lines together.

2. Add it to your site's <head>

The script goes in the <head> of every page. Find your platform below.

  1. In your GHL sub-account, go to Sites → Websites (or Funnels, depending on where your pages live).
  2. Open the site or funnel, then click Settings (the gear icon).
  3. Scroll down to the Tracking Code section.
  4. Paste your Zappush script tag into the Header Tracking Code field.
  5. Save. The tracker fires on the next page load for every page in that site or funnel.

Disable "Optimize JavaScript" on your funnel or website. Go to Settings → Performance & compliance and make sure Optimize JavaScript is turned off. This option lazy-loads custom scripts, which delays the tracker and can cause it to miss checkout and purchase events entirely.

Disable Optimize JavaScript in GHL

You need to do this once per site or funnel. All pages inside share the tracking code automatically.

GoHighLevel's docs explain the Tracking Code field in the Websites overview article. Scroll to the Tracking Code section.

The tracker captures page views and product views automatically. Checkout and purchase events require your site to push data to window.dataLayer. See the Data layer reference for the exact pushes needed.

Tracking is installed automatically when you connect your Shopify store. You can skip ahead to Connect Meta.

Recommended: custom app install. Reach out to us at support@zappush.com and we will install a custom app for you. The app tracks all events automatically, including checkout and purchase, with no manual data-layer setup required.

If you prefer to add it by hand via theme.liquid:

  1. In your Shopify admin, go to Online Store → Themes.
  2. Find your active theme, click the three-dot menu, then Edit code.
  3. Under Layout, open theme.liquid.
  4. Paste the script tag just before the </head> closing tag.
  5. Save. The tracker goes live on the next page load.
  1. The Zappush for WooCommerce plugin is the recommended path. If you have it, you are already done.
  2. Otherwise, install a header-scripts plugin such as WPCode or Insert Headers and Footers.
  3. Open its header scripts setting, paste the script tag, then save and publish.
  4. If you use WP Rocket or any caching plugin, clear the cache after installing so old pages pick up the tag.

The tracker captures page views and product views automatically. Checkout and purchase events require your site to push data to window.dataLayer. See the Data layer reference for the exact pushes needed.

  1. Open the template or layout file that renders your site's <head>.
  2. Paste the script tag just before the closing </head>.
  3. Deploy. The tracker fires on the next page load.

For React or Next.js, add it to your root layout or _document. For static sites, it usually goes in index.html.

The tracker captures page views and product views automatically. Checkout and purchase events require your site to push data to window.dataLayer. See the Data layer reference for the exact pushes needed.

3. Confirm the tracker is live

  1. Visit your store in a normal browser tab to generate a page view.
  2. In the dashboard, open Sessions or Events under Analytics.
  3. Within a few minutes you should see your visit appear: a session, and events like page views and product views.

Seeing nothing after a few minutes? Confirm the snippet is in the <head> on a live page, clear any page cache, and load a page in a fresh tab. The tracker only fires on real page loads.

You'll know it worked when

A session and at least one event appear in your analytics within a few minutes of loading a page on your store.

Next: Connect Meta.

On this page