Help Articles

You are viewing our old help center. Information in this section may be outdated.
Click here to go to our new help center.

Enable Site Tracking for Shopify Store

To enable site tracking for your Shopify store, first add your domain to the whitelist, and copy and paste the tracking code from ActiveCampaign into a new text file on your hard drive.

Make sure to remove the JavaScript tags from the code you pasted:

<script type="text/javascript">

You can name the file whatever you’d like, but make sure it has a JS extension. Our example calls it activecampaign_track.js.

In Shopify, edit your theme (go to Themes > Template Editor):

Under Assets, click “Add a new asset.”

Choose the JS file that you just created on your hard drive:

Next, under Layouts, click on “theme.liquid” in order to edit that file. Add the following line within the <head> section:

{{ 'activecampaign_track.js' | asset_url | script_tag }}

This should now be a part of your Shopify store.

To verify it’s installed you should see two network requests related to this. One is for your new JavaScript file that you added to Magento, and the other is to

In ActiveCampaign you can set up a segment for various URL’s on your Shopify site in order to see who visited them:

All that’s left is to send campaigns that contain links to your Shopify store and site tracking should be up and running for you!