How to implement Google Consent Mode via GTM? - google-analytics

I have a beginner question regarding Google Consent Mode implementation.
I'm installing GCM for the very first time for a client. This client uses Axeptio as CPM.
If I understand correctly, GCM will sent anonymous cookie less data to GA if a user doesn't or hasn't yet given consent. This will allow us to get page views and conversion data.
I read through Axeptio's documents:
https://developers.axeptio.eu/v/francais/cookies/gtag-et-google-consent-mode
https://www.axeptio.eu/post/utiliser-le-google-consent-mode-avec-axeptio
And through articles from Simo Ahava and Google's instructions:
https://www.simoahava.com/analytics/consent-mode-google-tags
https://www.simoahava.com/analytics/consent-settings-google-tag-manager
https://tagmanager.google.com/gallery/#/owners/gtm-templates-simo-ahava/templates/consent-mode
https://support.google.com/tagmanager/answer/10718549
But I'm still having trouble with the implementation. This is where I'm at so far :
I've enabled "Enable consent overview" in the Admin panel in GTM
I installed the HTML code given by Axeptio via GTM (triggered at Consent Initilisation)
I set all the GA tags to "No additional consent required"
I'm not sure what to do next. 
How do I verify that my settings are working? i.e. not give consent and see if my tags are still firing and data is being sent to GA?

Related

GTM consent mode Google analytics not tracking pageviews without consent

we have recently implemented cookies consent mode in Google tag manager. Pageviews in google analytics (both universal and GA 4) dropped to about 4 % of the original page views.
When I visit the web page without giving any consent some requests to google-analytics.com still appears in network tab. This tells me something is still tracked. No cookies are saved as expected.
Do you have a different experience? Should GA track pageviews anonymously even without consent or it this a correct behavior? Why would analytics script send any requests if it not appears in GA?
It is expected that you see requests to Google Analytics. However in consent mode you should not see _ga cookies being set (or existing _ga cookies being used). That's basically what consent mode is, cookie-free tracking. You should also see a parameter gcs=100 in the GA request to confirm that consent mode is indeed active.
However these requests are not surfaced in the reports (there would be no point, since without user identifier you cannot create sessions). Apparently they are being used for some sort of Machine Learning thing in the background, but I don't think this has much effect on the analytics part of GA (afaik this is more for Google Ads and GA audiences).
So yes, seeing requests in consent mode is normal (if this helps in any way with GDPR compliance etc. in entirely another matter). If you do not run campaigns and do not hope for an uplift via ML models applied to consent mode data, then you probably do not need to bother and can just disable the tags if no consent is given.
It happens because you have to set ad_storage and analytics_storage as denied by default in initialization code, like described in the documentation (in the example only ad_storage is denied, just add analytics_storage too): https://developers.google.com/tag-platform/devguides/consent#implementation_example

cookiebot in google tag manager with consent mode

I am trying to implement the Cookiebot CMP using Google Tag Manager and Google's Consent Mode. I followed the tutorial on https://support.cookiebot.com/hc/en-us/articles/360003793854-Google-Tag-Manager-deployment but the only other tag in my container besides the Cookiebot CMP tag, is the GA4 tag and that fires all the time.
My Cookiebot CMP tag has a trigger "Consent Initialization - All Pages".
My GA4 tag has a trigger "All pages".
Since I understood that the Cookiebot CMP is tightly integrated with Google's Consent Mode and since the GA4 tag is by default integrated with Google's Consent Mode I thought as long as no permission is given in Cookiebot, the GA4 tag would not be triggered. The question is: why is GA4 triggered although no consent was given.
Second question: how can I check the value of the Consent Mode variables "ad_storage",... In the Google Tag Manager Preview/debug mode I did not find any of these variables so this makes it difficult for me to check if the Cookiebot tag failed to set the Consent Mode variables or if the GA4 tag failed to respect the Consent Mode variable settings.
UPDATE:
I think I figured out some of the above:
when using the Consent Mode, the Google Analytics tag will still fire on all pages (this was also the only trigger defined for that tag in the tag manager) but the Google Analytics tag will take the value of analytics_storage into account and if it is not "granted", no analytics data will be sent to Google. So the tag fires, the GA script starts execution but doesn't do it's normal job of sending data to Google
the best way to check without any additional software is checking the cookies in your browser; using the Cookiebot CMP I could then see that by changing the permissions in Cookiebot, the GA cookie was set or not
a way to check the Consent Mode variables is by using the Chrome plugin "Google Analytics Debugger" which shows in the F12 console much of the communication with the data layer.
I had too the problem of the GA4 tag firing without consent.
The issue was that I had wrongly set the Default Consent State of Cookiebot CMP to Granted instead of Denied and once I set it correctly, the problem was solved.
In Google Tag Manager:
access the Cookiebot CMP Tag
modify the Tag Configuration
check that the Default Consent State is properly set

Does Google Analytics 4 (GA4) have session unification?

Universal Analytics has a setting (toggle) to enable session unification. This allows for events fired prior to the user logging in to be associated with that user's session. (During log in the Custom User Id (uid) is provided to enable this.)
However, I am unable to find this feature on Google Analytics 4 (GA4). Is this feature enabled by default? Or is this no longer supported? I have read almost all GA4 documentation, but unfortunately it is still pretty limited at the time of writing this.
Thanks!

Custom Campaigns with Google Tag Manager

I used to work with Google Analytics and build Custom Campaigns with the Campaign URL Builder.
Once I've moved to Google Tag Manager, I've stopped seeing any new campaigns in my Google Analytics page.
some facts:
No I'm not an idiot, and I've triple checked that I'm building the URL right in the Campaign Builder. (https://ga-dev-tools.appspot.com/campaign-url-builder/)
Again, I'm not an idiot, there are no Filters In my GA which hides all the new Campaigns.
I'm getting this error in my GA page:
"Property betzavta.me is not receiving hits. Either your site is not receiving any sessions or it is not tagged correctly."
=> though all the other GA functionalities are working currectly (Events, logged users, Real Time data and so on...)
I did install the Tag assistant chrome extension, and it only gave me warnings which say that I should ignore those warnings :-) :-)
Is there anything specific (Trigger, Tag, Variable) that I should define in GTM so the campaign URL will be sent to GA, because so far I didn't see anything about that.
Again, all the other GA things have migrated successfuly to the GMT ( the GMT sends them correctly to the GA).
All my Tags
Thanks
GTM is nothing more than an additional layer between site and GA. GTM doesn't do anything by itself, so utm parameters don't reach GA (and we presume they are correct), then you did something wrong setting up GA through GTM. What exactly you did wrong - it is pure guesswork, unless you provide more details. At least, example of a utm-tagged link and screenshot of the settings of you main GA tag in GTM.

Tracking offline conversions with Google Analytics

On a website with affiliate links, where there is no programmatic access to the conversion logs, I treat it as offline conversions.
My Setup
Online
A user visit my website, see the affiliated ad and a promotion view hit is being sent.
When the user clicks the ad, a promotion click hit is being sent and the user is redirected to another page on my site.
On the "redirection page", an product view hit is being sent, and the user is being redirected to the affiliation link, passing his Google Analytics clientId.
Offline
Once a week I download the stats from the affiliate program, which looks something like:
clientId visits conversions revenue
4444444444.3333333333 1 0 $0
1234567890.1234567890 1 1 $16.40
Then I use the Measurement Protocol to send offline events:
For each line of visit, I send a product click hit.
For each line of conversion, I send a product purchase hit.
My Problem
The conversion shows up on the eCommerce report:
Because the offline hits are being sent after the original session is already closed, a new session is opened which doesn't contain the info about the user.
So I can't see the conversion on the demographic report, for example:
Optional Solution?
I'm thinking of using the user-id feature of Google Analytics.
Even though the users are not identified, I can identify them by their clientId.
Sure, this is not what Google intended when they introduced that feature, but I believe it will solve my issue. I'm just not sure about the negatives.
My Questions
Any feedback on my setup?
Why is it even necessary to pass the clientId after the session is closed? what kind of information is being shared between the real session and the offline hit?
Is it a bad idea to pass the clientId as a userId to Google Analytics? Why?
Relevant Articles
A Comprehensive Guide to Tracking Offline Interactions in Google Analytics using the Measurement Protocol
Google Universal Analytics isn’t Linking Offline and Online User Properly
We were able to link offline action through as you did with measurement protocol but the problem is that those sessions are not included in demographic and age report.
Rather looking those report I used them to do segmented analysis E.g. pages they have look at, sources they used to come also I used it with attribution model to understand best channels to drive more conversions.
Yes you can use CID as a user ID but I haven't tried it with offline tracking. Share the result with us.

Resources