I am having trouble tracking without cookies using GA4.
I have both a UA and a GA4 property that I am tracking simuntaniusly using gtag:
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("consent", "default", {
ad_storage: "denied",
analytics_storage: "denied",
wait_for_update: 1000
});
gtag('set', 'url_passthrough', true);
gtag('js', new Date());
gtag('config', 'UA_TRACKING_CODE');
gtag('config', 'GA4_TRACKING_CODE');
Both UA and GA4 complies with consent set to "denied" and are not setting any cookies.
In UA i can see the pageviews coming in even though no cookies are beging set. But nothing is tracked in GA4 unless i set the "analytics_storage" set to "granted".
Does anyone know how to track in GA4 with "analytics_storage" set to "denied"?
With the Consent Mode it doesn't even track Universal Analytics if analytics_storage is denied (you can see that the data is sent to the Google Analytics servers but none of those hits will be shown in the reports).
This subject is very confusing and frustrating for me as well.
In short - I believe GA4 won't let you track ANY information without user consent (not even aggregated, anonymous information).
Here's some documentation, that I don't think was available when this question was asked:
https://support.google.com/analytics/answer/9976101?hl=en
Spesificaly:
analytics_storage='denied'
...
Cookieless pings will be sent to Google Analytics for future measurement. Google Analytics 4 will use cookieless pings for modeling.
I tested it, and that's indeed the behaviour I see when analytics_storage and ad_storage are 'denied':
No cookies are set
GA sends a ping for every pageview (i have set-up a server-GTM, so the ping goes there - and from there to Google)
The pageview-ping does not show in:
real-time report
normal reports (not even after 24h - some posts I've seen said it takes 24h. but it doesn't. It's never visible in reports)
Not even in DebugView (a GA4 feature)
Sadly, I couldn't find statistics about consent-preferences - how many people accepted/rejected each storage option
I think GA4 went too far here -
I just want to track aggregated, anonymous data, when users reject cookies. That's not PII at all. I just want to know stuff like "how many people have visited this page in my site". That shouldn't be banned.
But seems like it is, and I've yet to understand why or how to get around it.
I know GA4 sends a parameter called gcs (Google Consent Status) with the ping. presumably, in my sGTM, I can send my ping without this parameter, or set it to G111 (= 'permissions granted'), and maybe that would make the pageview count in reports, but so far I wasn't able to override this parameter - not in GTM, nor in sGTM (Server-Side GTM).
If anyone knows a solution to this situation - I'm more than happy to hear.
Related
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
hope someone can help with this problem we are having.
We are using google analytics on several websites with the only purpose to have a visits counter of each one.
We do it using Google Analytics Reporting API and this is the only reason: we don't use it for marketing purposes or to analyze audiences or behaviour. We want to understand if this is compliant with GDPR since we don't ask cookie permissions to users on each website or if is there a way to just use Analytics as counter without showing any consent message to users.
Let me know
Thanks
There is no universal rule for all UE member states, however many guarantors (such as the Italian one) have stated that by reducing the identifying power of an analytical cookie, this cookie can be considered a technical cookie.
A technical cookie does not require acceptance but can always be provided
In order to reduce the identifying power of the Analytics cookie, it is possible to use the IP Anonymization (or IP masking) setting in Google Analytics hit which removes the last octet from the IP that sends (automatically) with the call to the Google servers. In this way, the user cannot be geolocated and the GA cookie is considered to be of a technical nature.
With Universal Analytics you need to add a setting to the tracking code while with Google Analytics 4 IP anonymization is the default.
If you use gtag, the code is something like this:
<!-- IP anonymization with gtag.js - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID', { 'anonymize_ip': true });
</script>
I used customTask in Universal Analytics tags via tag Manager to tackle PII. After that, I regularly monitored reports in Google Analytics and found all the hits were cleaned.(i.e. PII redacted)
But I still get emails from adwords-noreply#google.com, that some of the URLs linked to particular 'remarketing lists' are violating PII.
Now there's no way to confirm that PII is actually violated. I dont know where I am supposed to look, in which section (of Adwords account or Analytics account) can I see the URLs being passing PII info to Google?
This is what I'm seeing in GA reports:
https://siteurl/u/password-reset/reset?email=ja[ REDACTED EMAIL]l.com&authenticationCode=8127489044212
this is what is sent in the violation email:
https://siteurl/u/password-reset/reset?email=jack#emabell.com&authenticationCode=8127489044212
If I have redacted the PII using tag manager, do I still need to do something in the Adwords account ?
It turns out that custom fields cannot be added with tag type- 'AdWords Remarketing', due to which I couldn't run my redacting logic using 'customTask'.
Hence I created a customHTML tag and fired it on the 'Page View' event which filtered all the URLs
PII in GA is of a serious concept. Eventually, Google might delete your data.
I usually solve this by using filters in GA View. This is like a last line of defence
Guide on how to setup is here
https://www.internetrix.com.au/blog/google-analytics-pii-safe-guarding-emails-2/
I'm using Google Analytics to send and track a registration goal, based on a custom pageview.
Basically, every time a user registers and gets redirected to dashboard, I trigger a custom pageview using JS:
ga('send', 'pageview', {page: '/gapv/registration/success'});
The tracking works. However, when I compare the GA tracking with the number of registrations from the database of my website, the GA goal completion always shows around 10% less registrations.
I checked the tracking on various desktop browsers, all seems to be fine. Additionally, I hear that content blocking on mobile browsers gets more and more popular.
Is it possible that browser content blocker plugins might block my custom pageview from being fired? I send the pageview on DOM ready.
What else might explain the difference between my DB results and the GA goal count?
Any ideas are very welcome.
Users can opt-out from Google Analytics
Depending on where your tracking code is placed users may leave the page before the hit registers with GA (i.e. users might leave before the DOM is ready - can you move your tracking to pageload ?)
Some Ad blockers block GA, too (some claim this is especially true if you use the "advertising features")
There might be occasional javascript errors that prevent tracking (or users do not have javascript enabled at all)
As a serverside mechanism your database will be more reliable. While you may be able to bring the discrepancy down to single digits it is not likely that the numbers precisely match (even if you do server-side tracking with GA via the measurement protocol you still have to respect user opt-out).
Ok so here is a scenario I would like to get some ideas on:
A user shows up to my site and registers for my service...lets call the service "vaporware".
After registration the user proceeds to view all the glorious features that my cloud based vaporware has to offer. Each feature that they use during their visit is recorded using Event Tracking in Google Analytics and I can effectively track engagement.
Now the problem:
One of the features in my Vapor product has tasks built in. These tasks are important for a number of reasons...they are recurring and do not require any action from the user to execute.
How would I using either "old" google analytics or the new Universal Analytics go about tying these "background events" visitors? I am thinking that the new Measurement Protocol may be have the answer as this perhaps can be considered cross platform tracking...
Regardless this keeps coming up a lot for me and am interested even finding a hack/work around to start recording these types of events in GA.
If they're logged in, you can substitute the autogenerated client ID with your own user/account ID (make sure to anonymize it before sending it to Google).
With the Measurement Protocol it's the cid parameter:
...v=1&tid=UA-XXXX-Y&cid=my-user-identifier&t=event...
In the Universal Analytics JS code, it would be something like this:
ga('create', 'UA-XXXX-Y', {
'clientId': 'my-user-identifier'
});
Hope this helps :)