How to enable site tracking for your Shopify store

To enable site tracking for your Shopify store, follow the steps below:

  1. Log into your ActiveCampaign account and go to Account > My Settings.

    account_mysettings.png

  2. Select Tracking from the left side menu.

    Select_tracking.png

  3. Toggle site tracking to “On” by clicking it.

    toggle_site_tracking_to_on.gif

  4. Add your domain to your whitelist. The domain you are adding here is your store URL.

    Add_domain_to_whitelist.png

  5. Copy the site tracking code and paste it into a new text file.

    copy_site_tracking_code.png

  6. Remove the Javascript tags from the code in your txt file:

    <script type="text/javascript">
    ...
    </script>
    remove_js_tags.png

  7. Save your text file as plain text and make sure it uses a JS extension.

    save_as_js_file.png

  8. Log into your Shopify store. Select “Online Store” then “Themes” from the left side menu.

    select_online_store_then_themes.png

  9. Click “Actions” from the dropdown, select “Edit HTML/CSS.”

    actions_then_edit.png

  10. Click “Assets” then select “Add a new asset.”

    assets_then_add_new_asset.png

  11. Choose the javascript file you just created on your hard drive. Click “Upload asset.”

    Add_a_new_asset.png

  12. Next, go to “Layouts” and click “theme.liquid.” Within the <head> section, add the following:
    {{ 'ActiveCampaign_Tracking.js' | asset_url | script_tag }}

    Note: 'ActiveCampaign_Tracking.js' is an example file name. You will need to insert your own JS file name here. Make sure to include your file name in all layouts.

    theme_liquid_3.png

  13. Click “Save.”

    Click_save_shopify_site_tracking.png

Advanced: Verify that site tracking was successfully installed
To verify that you have successfully installed the site tracking code into your Shopify store, go to your store's public page. Then, open your developer tools*. The developer console will open and you will see a page like the one below with your JS file that you added and the ActiveCampaign tracking code.

site_tracking_installed.png

*Links to help you locate your browser's developer tools:
Chrome
Firefox
Internet Explorer

Have more questions? Submit a request