Shopify & AnyTrack Integration

The AnyTrack Shopify provides the most reliable and accurate way to seamlessly track your customers' journey and send every event to the Facebook Conversion API and other ad platforms.

The Shopify AnyTrack integration leverages both client-side data collection and server-side API to guarantee 100% conversion data is tracked and attributed to your marketing channels.

Technical Level Validation Setup Time
Beginner Real Time 3-5 Minutes

AnyTrack Shopify integration Overview:

Anytrack Events JS Tag Webhook Facebook Event Mapping
ViewContent   View Content
Add To Cart Add To Cart
Initiate Checkout Initiate Checkout
Add Payment Info   Add Payment Info
Purchase Optional Purchase

Steps in this guide:

  1. Add the AnyTrack Tag on your shop (client-side tracking)

  2. Add Webhooks (server-side tracking)

  3. Prevent Duplicate Events

  4. FAQ

Step #1: Add the AnyTrack Tag on your shop

Very much like any other Tracking Tag, the AnyTrack Tag should be added to the head section of your website. There are different options to do so, which we outline below.

Option #1: Directly on the theme

While this option is extremely simple and easy to implement it will require to paste the AnyTrack Tag directly in the Code of your theme. If you don't feel comfortable with it, skip to the next option.

  1. Edit the theme
  2. Paste the AnyTrack Tag in the head section

  3. Save

Option #2: Use a tag management app

This option implies that you already have the Google Tag Manager container set on your theme.

  1. Open your GTM container
  2. Add a new Tag
  3. Trigger for all page views
  4. Save and publish

More about the Google Tag Manager setup here.

Option #3: Use the XO Insert Code app

The XO Insert Code app is a very popular app in the Shopify App store as it's free and lets you add any tracking tag in your theme, without having to code.

  1. Install the XO Insert Code app on your store (Free version here)
  2. Navigate to Apps -> XO Insert Code
  3. Click on "Add new code"
  4. Paste the AnyTrack TAG code inside Code in the header
  5. Save your settings

From this point on, all events triggered on your shop will be recorded by the AnyTrack Tag.

Step #2: Shopify AnyTrack Webhooks 


While it's possible to track Purchase events via the "checkout" page, it is recommended to leverage the Server Side Tracking option to track conversions as this method bypasses every possible ad blockers, browser privacy blocking settings.

Because the data is sent in a secure way and doesn't expose any customer data through the browser, the server-side provides a lot more data to AnyTrack which improves tracking and attribution by several folds!

Setup instructions

  • In AnyTrack: Navigate to the integration panel and click on Install Shopify
  • Open your shop Notification options under Settings
  • Scroll down to the Webhook Notifications and click on create webhook

    1. Select the Cart Creation event
    2. JSON Format
    3. Paste the AnyTrack Webhook URL
    4. Update the version to "latest"
    5. Save
  • Repeat the same process for the Cart Update, Checkout Created, and Order Created events

Your Shopify setup is complete! AnyTrack will automatically send real-time conversion data to the pixels connected to your AnyTrack Property.


Step#3 Prevent Duplicate Events

If your Shopify store is sending data directly to Facebook, chances are that you will start tracking duplicate conversions.


AnyTrack and Shopify use a different event_id to deduplicate the conversion, and consequently, Facebook will receive the same conversion twice, with two different deduplication event id.

The Shopify direct integration

In order to prevent event duplications, you will need to either disable your current Shopify Facebook Conversion API and Google Ads integrations or connect AnyTrack with a different Facebook Pixel ID and create a separate Google Analytics view.

Update your Shopify settings

  1. From your Shopify admin, go to Online Store > Preference
  2. Scroll down to see your pixels integrations


Google Analytics:

You can either remove Google Analytics from your settings, or you can create a different google analytics View where you'll instruct AnyTrack to send your conversion data.

Facebook Pixel:

👉If you have tracking enabled, you can disable it simply by clicking on "Set up Pixel", navigating to "Data sharing settings", and Disconnecting the pixel from tracking.


💡UTM Tracking: To improve your Facebook Ads attribution and reporting, we highly recommend adding the prebuilt UTM Tracking template provided in the Tracking Pixels on your AnyTrack Account.

⚠️Facebook Conversion API delayed reporting

Since Facebook reports conversions with up to 72 hours delay, you will notice some discrepancies between what you see in your AnyTrack reports and what is reported in the Facebook Ads manager. 

🕜 AnyTrack sends conversions to the Conversion API in real time.

Congratulations 🎉

Your Anytrack account is now set up and ready to streamline your data across your marketing stack!

Popular Questions:

Client Side Tracking Settings

➡️ The client-side settings are located in the Property Settings -> settings

  • Client side tracking relates to website events that can be tracked via the AnyTrack Tag. For example:  AddToCart, or OutboundClick, or FormSubmit.
  • Client Side Tracking gives you more control over the Checkout Flow events and lets you enrich your ad pixel with more data points that will be later used for server-side tracking and attribution. 

URL parameter - allows AnyTrack to pass and read unique tracking parameters through your funnel

Hidden parameter - AnyTrack passes a unique tracking parameter into the cart's standard hidden fields. This option enables you to guarantee maximum tracking accuracy.

👉 For best results we recommend both options should be turned on.

Client Side Integration Events

  • Client Side Tracking has proven to be faulty due to ad blockers and other privacy-focused browsers. AnyTrack uses Server Side integration to receive and send events, so you can guarantee 100% tracked conversions. 
  • Each method has its benefits, but since every shop is different, you have the ability to modify these settings to accommodate your business needs and requirements.

👉 Your server-side integration event settings can be found in the Integration on your AnyTrack account.

Screen Shot 2021-12-15 at 15.09.06

🚫 The Purchase event is disabled by default since Server Side Tracking is far more reliable.

  • Unless you've set your Anytrack property client-side tracking to send purchase events, you should only see Purchase events sent via SERVER in your Facebook Events Manager.


My cart displays the atclid tracking parameter?

  • This happens when some Shopify Apps do not "respect" the native "hidden" field settings created by other Shopify Apps. 👉 Follow this article to fix it.


I am getting a double count of conversions on Facebook?

  • This can happen if your Shopify is already integrated with the Facebook Conversion API.
  • Since AnyTrack and Shopify use a different Deduplication event_id, Facebook cannot deduplicate accordingly.
  • You should disable the Facebook Conversion API from within your Shopify App.


I can't see eCommerce Transactions in Google Analytics?

  1. In Google Analytics:
    1. Make sure you've enabled eCommerce and enhanced eCommerce
    2. These settings can only be set by a user with Admin permissions
  2. In AnyTrack:
    1. Make sure you have enabled the Server-Side Tracking from the Google Analytics Integration.
    2. Make sure you have check the box for enhanced eCommerce.

When should I also connect Google Analytics?

  • If you run campaigns on Google Ads
  • If you want to see your conversions in Google Analytics (faster than in Facebook Ads).
  • If you want to see a life time value of your campaigns - regardless of the traffic sources.
  • If you want to create custom audiences - out of any traffic! - and retarget on Google Ads, Search, Display, Youtube, Gmail. 

💡 Learn more about the AnyTrack Google Analytics Integration


Should I use the Google Ads Conversion Tracking or Google Analytics?

  • You can use both in parallel and select the one you want to optimize your ads for.
  • Google Analytics provide additional insights due to the deep ecommerce integration
  • Google Ads can track post-view conversions
  • Google Ads integration can track the iOS 14.5 Conversions


I use a custom Shopify App for my checkout, does AnyTrack supports custom Shopify Apps?

  • Yes, in most cases but if you see some discrepancies, please contact the support so we can make the necessary adjustments. 

I am using an email marketing software, does AnyTrack track email campaigns?

  • Yes as long as you append standard UTM parameters to links set in your email campaigns.


Why do I have a low Click ID (fbc) match rate?

  • AnyTrack sends ALL conversion data to the Facebook Conversion API (including organic, google etc…).
  • When it’s from Facebook traffic it will be sent with the fbc parameter - if not, then only the fbp parameter is sent.
  • It's likely that most of your traffic doesn’t come from Facebook - hence there’s no fbclid parameter to capture.
  • Refer to Google Analytics attribution reports to uncover which other traffic sources might be responsible for your conversions



Tracking methods:

To guarantee the best possible tracking and attribution, AnyTrack leverages several data points and tracking methods.

Here are some data points that we currently use:

  • URL tracking parameters: We add our unique atclid parameter on your shop URL when a visitor hits your landing page. It's similar to the fbclid or gclid parameters that Facebook and google add to your page URL.
  • We collect and process first-party data when visitors engage with your shop.
  • We append URL parameters to your product URL when the customer creates its cart.
  • We append a hidden parameter atclid to the checkout flow when visitors initiate a checkout. (you can see this parameter in the conversion log of your shop - both in AnyTrack and Shopify)
  • This method guarantees the most accurate conversion data, fast delivery and optimal data collection.
  • From the moment the customer journey starts until it ends, AnyTrack sends conversion and event data to your connected ad platforms and analytics.

💡 The atclid parameter is used to improve tracking and attribution.


👉 Integration Checklist

AnyTrack account:

  • Do you see the conversions in AnyTrack? Check the integration Event Log.
  • In your campaign report, do you see UTM parameters and associated values?
  • Did you enable the Facebook Conversion API?
  • Is your conversion event mapping set to send the conversions you want to the Facebook API?

Shopify Account:

  • Did you disable/disconnect Facebook and Google pixels from your store?
  • Did you add the webhooks (with the "latest" api version)
  • Did you add the AnyTrack tag to your header script?

Facebook Ads account:

  • Did you connect with the correct pixel ID?
  • Are you using the Facebook Tracking URL template provided by AnyTrack? (how to verify your ads)
  • Did you verify your domain with Facebook Business Manager
  • Do you have a domain allow list? Are you seeing domains that shouldn't be there?
  • Did you select your 8 conversion events?
  • Did you enable 1st party cookies?
  • Did you enable all automatic matching parameters?
  • Did you select the right conversion event for your campaign?
  • Do you see the conversion events in the Facebook Event Manager?