Additional cookie blocking

Google Analytics & Facebook Pixel can track the acquisition of your store visitors, what pages they frequently visit, how much time they spend on each page, and much more. 

In this article, we will take a look at the additional cookie blocking for Google Analytics & Facebook Pixel and what can you do to make your store visitors feel more secure.

Google Analytics

Google Analytics creates cookies on a page load and our GDPR/CCPA app removes them on every refresh. As we are constantly deleting the cookies each page load is considered a new visitor session. That way, Google cannot fully track what the customer is doing on your web store. We chose this method because of Shopify's limitations. They are preventing us from getting the tracking codes for each store. Although, there is one more thing you can do if you want to add additional protection for your visitors.

Follow the steps below:

  • Open Shopify Admin.

  • Click on the Online Store link in the left menu bar.

  • Click on the "Action" dropdown button and select "Edit Code" from there.

  • A new page will open with a list of files on the left side of the screen. Open the "theme.liquid"

  • Find the string "</head>" in there.
  • When you do, add the following snippet before "</head>":

Note: Make sure to replace the "UA-XXXXXX-X" string with your Google Analytics tracking ID.

  • After you add the snippet click on the Save button.

Facebook Pixel

For the Facebook Pixel, the procedure is the same:

  • Open Shopify Admin.

  • Click on the Online Store link in the left menu bar.

  • Click on the "Action" dropdown button and select "Edit Code" from there.

  • Find the string "</head>" in there.

  • When you do, add the following snippet before "</head>":

  • After you add the snippet click on the Save button.

We use these two scripts so that the blocking is always correct for people who give up cookies.

Shopify offers a feature for additional cookie blocking called Limit tracking for customers. This feature limits Shopify’s tracking of online store customers and notifies any third-party apps that you have installed in your store to limit their tracking. You can enable it for customers in Europe by following these steps:

  • In your Shopify admin, click Online Store.

  • Click Preferences > Customer privacy.

  • Click Limit tracking for customers in Europe.

After you have added additional cookie blocking to Google Analytics or Facebook Pixel through our app, you can go and click on the Limit tracking for customers in Europe option, as well. That way Shopify will make additional cookie blocking to Google Analytics and Facebook Pixel including on the Checkout page.

Your customers in California can opt-out of the sale of their data, too. You can enable Limit the third-party sale of your California customers’ data in your Shopify store settings. You are able to do it with just a few clicks:

  • In your Shopify admin, click Online Store.

  • Click Preferences > Customer privacy.

  • Click Limit the third-party sale of your California customers’ data.

Keep in mind that when you share your customer’s data with third parties, Shopify can't control how the data is used. It can only inform how data should be handled.

Shopify can’t control if a third-party app or script tracks customers. That is why they provide a consent tracking API for integration. We have integrated this consent tracking API into our GDPR/CCPA app. However, this consent tracking API has some limitations. For example, in our app, you can choose which cookies to block, either Facebook Pixel ones or Google Analytics ones. However, Shopify doesn't offer this option, so if the Limit tracking for customers feature is enabled all the cookies for Facebook Pixel & Google Analytics will be blocked.

Google Tag Manager

Google Tag Manager blocking is also available, and it can be done with an additional script. Based on a Container ID the script below will block the Google Tag Manager.

Google Tag Manager will be set based on a condition, which is checking one of the cookies, that are set by our app. This cookie is storing information on which exact cookie group is blocked currently. This depends on the initial state or the preferences of each customer. When the initial state is set to block the Analytics cookie group or the customer opts-out, the script which is setting the Tag Manager will not be executed.

Check the instruction on how you can apply the script:

  • Open Shopify Admin.

  • Click on the Online Store link in the left menu bar.

  • Click on the "Action" dropdown button and select "Edit Code" from there.

  • A new page will open with a list of files on the left side of the screen. Open the "theme.liquid"

  • Find where you have set the script for GTM in the "<head>". It should look similar to this:

  • After you have located the script, copy its contents between "<script>" and "</script>" and paste them here:

  • When you are done the final result should look like this:

In case of any questions, our FAQ page is available 24/7 or you contact us via chat or email.

If you still don’t use our GDPR/CCPA + Cookie Management app don’t think twice download it now.

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time
comments powered by Disqus