Features
Utilize advanced features and integrate CookiePal with other tools.
GTM Custom Script
Step-by-step guide on setting up and using Google Tag Manager with custom script for cookie consent.
CookiePal helps you ensure your GTM website complies with GDPR and other privacy laws by managing cookie consent for your users. This guide will walk you through the steps to integrate CookiePal with your GTM site.
Step 1: Sign up/create a CookiePal account
If you do not yet have a CookiePal account or have not yet configured your banner, follow the steps below.
1. Sign up for CookiePal.
2. After confirming your email, you will be directed to customise your banner. Select your preference.
3. Customise your banner/logo colours.
4. Customise your banner types and positions.
5. Customise your preference centre.
Customisations can be changed later on the customisation page.
6. Copy your code
Step 2: Sign up for Google Tag Manager
If you don’t have a Google Tag Manager account, sign up for one by visiting Google Tag Manager and following the account creation process.
The Container is where you’ll manage and deploy your website’s tags, triggers, and variables. Follow the steps below to create and install a new container.
1. In Tag Manager, click the Accounts tab > Create Account.
2. Enter an Account Name and select the Country for the account.
3. Enter the Container name and select the container type.
4. To create your container, click Create and agree to the Terms of Service.
Step 3: Install the Container
Upon container creation, a modal containing two code snippets to install on your website will appear.
Step 4: Implementing with a Custom Script
This step will guide you on how to integrate CookiePal into consent mode without using the CookiePal GTM template.
1. Copy the custom script and paste above the Google Tag Manager script and CookiePal script
1<script>
2 window.dataLayer = window.dataLayer || [];
3 function gtag() {
4 dataLayer.push(arguments);
5 }
6 gtag("consent", "default", {
7 ad_storage: "denied",
8 ad_user_data: "denied",
9 ad_personalization: "denied",
10 analytics_storage: "denied",
11 functionality_storage: "denied",
12 personalization_storage: "denied",
13 security_storage: "granted",
14 wait_for_update: 2000,
15 });
16 gtag("set", "ads_data_redaction", true);
17 gtag("set", "url_passthrough", true);
18</script>
If Google Tag Manager is already set up on your website, make sure to place the GTM script immediately below the Custom Consent Mode Script and above the CookiePal script.
If Google Tag Manager is not yet installed on your website, please follow these steps.
1. Insert the GTM script between the Custom Consent Mode Script and the CookiePal script. Also, make sure to add the <noscript> element immediately after the opening <body> tag.
Proper script loading order is essential for their correct operation, so adhere to the specified sequence based on your consent mode setup.
For Advanced Consent Mode
1. Custom Consent Mode script
2. gtag / GTM script
3. CookiePal script
For Basic Consent Mode
1. Custom Consent Mode script
2. CookiePal script
3. gtag / GTM script
Step 5: Verify Integration
To confirm the integration of CookiePal and validate the correct implementation of Google Consent Mode on your website, access our help guide.
2. You can go to the dashboard.
3. Go to settings.
3. Enable Support GCM.
4. After these steps and after deployment, you can click on "Verify Banner" on the dashboard or click on "Get installation code" in settings and click "Verify Banner".
Step 6: Additional instructions
Defining the Default Consent State of Google Consent Mode.
CookiePal CMP maps all seven Google consent types into 4 categories.
Advanced Consent Mode.
In accordance with Google's documentation, we allow an user to select between basic and advanced consent mode. Click here to understand the difference.
When enabling Google Consent Mode, basic consent mode is enabled by default.
To enable Advanced Consent Mode.
1. Go to CookiePal settings.
2. Select the "Allow Google tags to fire before consent" option.
Settings and Google Privacy Policy
All settings related to Google Consent Mode can be viewed and adjusted in the CookiePal settings. These settings allow you to customise how Google's scripts interact with user consent on your website.
Additionally, Google's privacy policy is enabled by default when you activate Google Consent Mode. This policy governs how user data is collected and used by Google. For more details on Google's privacy policy and its implications, you can review Google's official documentation or check the CookiePal settings.
Troubleshooting and Support.
If you encounter any issues during the integration of CookiePal with Google Tag Manager, please contact our support team at support@cookiepal.io or use the chat bubble available on the CookiePal dashboard. Our support team is ready to assist you and address any problems before seeking assistance from Google Support.
Any Questions Left?
Feel free to contact us and we will answer all of yours remaining questions!
Contact Us