Shopify Lead Tracking

SegMetrics allows you to track the page visits and web information of leads acquired through Shopify, by simply adding the tracking pixel to the shop you want to track.

When a customer purchases from Shopify, their contact information will be sent to the CRM that you have configured in SegMetrics. But you'll also want to connect the web history of those leads into the full customer journey. In order to do that, we'll want to install the tracking pixel on your Shopify pages, as well as special code on your purchase thank you page.


Get the SegMetrics Tracking Code

  1. In SegMetrics, go to your Site Setup page from the gear in the top menu, and copy the pixel code.
  2. If you haven't configured your Tracking Code previously, check out the Installing the Tracking Pixel instructions to set up your site correctly.

Install the SegMetrics Tracking Code on Your Shop

We recommend using Google Tag Manager for installing your SegMetrics code on your Shopify Site. This will make sure that the code is available on your pages, without having to edit each theme template.

However, if you would like to install the Tracking Code manually, please do the following:

  1. In your Shopify admin, click Online store, and then click Themes.
  2. In the theme drop-down, click Edit Code.
  3. Copy the Tracking Code pixel (above) from SegMetrics
  4. In your Shopify admin, open your theme.liquid file.
  5. Paste the code pixel as low in the <head> of the theme.liquid code as possible.
  6. In your Shopify admin, click Save.

Install the Checkout Code (Shopify Plus Only)

  1. Open your checkout.liquid file.
  2. Paste the code pixel as low in the <head> of the checkout.liquid code as possible.
  3. In your Shopify admin, click Save.

Install the Checkout Code (Non-Shopify Plus Only)

If you are a Shopify Plus customer, you do not need to configure this part of connection. However, non-Shopify Plus customers may not customize the  checkout.liquid file to install the code.

In that case, please follow the steps below to connect identify the user after purchase:

  1. From your Shopify admin, go to Settings > Checkout.
  2. Under Order processing, go to the Additional scripts text box.
  3. Make sure that the SegMetrics tracking code (above) is also on the Thank You page.
  4. Copy / Paste the identify script UNDER the SegMetrics Tracking Code:

    <!-- NORMAL SEGMETRICS TRACKING CODE GOES HERE -->
    
    <script type="text/javascript"> 
    _segq.push(['identify', '{{ order.email }}']);
    </script>
    		
  5. Click Save

Install the Upsell Code

If you are using a one-click upsell or post-purchase app like Zipify, you will want to add the tracking snippet to the Post-purchase additional scripts in Shopify in order to connect the purchases for customers who abandon the post-purchase flow.

  1. From your Shopify admin, go to Settings > Checkout.
  2. In the Post-purchase additional scripts field, enter the SegMetrics tracking pixel.
  3. Click Save

Full instructions can be found in Shopify's Help Documentation

Still need help? Contact Us Contact Us