What more can the Integrations tab do for your shop?
July 14, 2022
We have some updates to announce this month, starting with the new changes in our Integrations tab, more specifically the Tracking services and their blocking.
When clicking on the Integrations tab in our Consentmo app what you will notice is the new "Services Tracking" section. There we have made it readily available for our premium users, which integrate most of the tracking services manually, instead of using the Online Store > Preferences option.
Let me show you how you can add the blocking scripts to all of Google and Facebook's most common services with one click of a button.
How to add blocking scripts from the Integrations tab?
First things first, you need to add the service tracking scripts for the services that our app can integrate with - Google Analytics, Google Analytics 4, Google Ads, Google Tag Manager, Google Consent Mode, and Facebook Pixel. You can get these scripts from Google Analytics, Google Tag Manager, Google Ads, and respectively Meta for Developers websites.
The service tracking scripts have to be added to the Theme of your Shopify store in the theme.liquid file. You will need to navigate to Online Store > Themes > Current theme > Actions > Edit Code. There, open the theme.liquid file and place the code in the <head> HTML element as shown here:
Adding the blocking scripts is how our app integrates with each tracking service and how we block it depending on your customer's cookie preferences. Instead of doing this manually, here is how we automated this process:
1. From the Integrations tab, choose Services Tracking
2. Select the Service you want to block (ex. Google Analytics)
3. Scroll down to the "Manage blocking script" section and click on the "Add blocking script to theme.liquid" button
Note: The ✔ or ✖ signs above the button signify whether the blocking script is successfully added or removed by our app. If you add or remove the blocking scripts manually, the sign above won't change, since it can only detect changes made by the app.
4. The service tracking script is commented out. A file containing the blocking script is added to the "Snippets" folder and that file is included right below the commented service tracking script by using an include tag in the theme.liquid file:
The added file in the "Snippets" folder that contains the blocking script
The include tag that includes the file containing the blocking script to the theme.liquid file
And this is how it is done!
To remove the blocking script from your store, just click on the "Remove blocking script from theme.liquid" button. It will uncomment the service tracking script to its original version, delete the file in the "Snippets" folder containing the blocking script, and remove the include tag.
Note: In case you want to delete the app, make sure to remove the added code. This way, no snippets of code will be left in your theme.
Tools that are exceptions:
Google Consent Mode does not require a service tracking script to be integrated with our app. The blocking script can be directly added by clicking on the "Add blocking script to theme.liquid" button.
Facebook Pixel's blocking script can be added both when a Facebook Pixel is set in the theme.liquid file, as well as when Facebook Pixel is set from Shopify's Online Store > Preferences page.
So this is how you can activate the blocking scripts directly from our Consentmo app. Feel free to comment and engage however you want, we appreciate the feedback.