Piwik tracking more events than GoogleAnalytics - google-analytics

I have a event that is fired in Piwik and Google Analytics when the pages loads. The event is firing something like "The product was viewed". However, I have a discrepancy between the numbers, in general 9% of difference.
I have the average of 100k events by day.
The server are configured
Load balance
Redis
All optimisations.
I am firing the Google without noninteraction/beacon flag. Can it be a
problem?

Problems can be caused by:
Limit: 500 hits per session
Tracking blockers restricting only GA
Different time of Piwik and UA script execution
Sampling
But do not try to compare two different technologies, you will probably newer have exactly same data. Rather learn about limits and differencies.

Related

Page load issue with GA4

We have a problem related to execution times are observed related to GA4:
Basically, the page loads so fast that once an action is signalled and, in most cases, GA4 does not have time to execute. We did not see this problem with UA.
With 'Preview Mode'in GTM, GA4 executes as it should do, and so, the information is sent to GA4 servers.
About the "normal" execution: the website behaves way too fast, and so, even though GA4 executes, it does not have enough time to send the information to GA4 servers (pending requests which information does never reach GA4 servers).
We investigated and tested different implementation ways to fix it but the problem is still there.
Any of you have an idea about this?
We also attach the screenshots of the tests carried out:
UA run times, approx. 100-200 ms. - Image 1
GA4 runtimes, approx. 5 seconds - Image 2
GA4 execution times with the GA Debug extension activated, approx. 100-200 ms. - Image3
Many thanks,
Do you still see the issue between UA and GA4?
Based on the google document from GA4, GA4 will use sendBeacon to send events, this is to fix some problems with the old UA using XMLHttpRequest to send events, the problem with the XMLHttpRequest is that if events send during the unload page event, the events might not send by the browser.
Also, depending on the scenarios, most GA4 events will batch together and send from the browser, so if you're in debugging mode, events are sent immediately, that's why you see the time faster.
So, in normal mode, GA4 might send events in delay but it batch events altogher, the good thing is if you go to a different page, the event will continue to fire sine GA4 using the sendBeacon API.
You can also refer to this article from GA4 about event batching for GA4.

How to know if Google Analytics Property is going to exceed 10M Hit Limit? Other than checking on Google Analytics? Any API's given by Google?

I am using free version of GoogleTagManager and GoogleAnalytics for getting analytics my website. The free version of Google Analytics allows for up to 10 million hits per month, per property as per TOS.
We can check under settings section in GoogleAnalytics account as to what is the hit count in last day, last 7 days, and last month.
But, since that requires manual intervention that someone has to login to check; Is there a way to get to know what my current limit is for the month? So that if I am closer to breaching the limit we can disable GTM tracing.
Is it different for GTM?
There is no hit limit for GTM.
In Google Analytics, you could use the Reporting API to get monthly statistics, and then use the GTM API to pause the GA tags (which makes this somewhat on-topic).
The relevant metric would be ga:hit. This is not exact (it reports the hit volume of the view rather than the property) but should be "good enough" (as long as your view is not too heavily filtered; since a proper setup includes an unfiltered view in any case this would be a good candidate to get the number).
However you do not need to bother. If you exceed the limits then Google will warn you via email. You then have a few weeks to respond, and introduce sampling or other measures to bring down your hit count. Only if you ignore their warning they will terminate your account.

Google Measurement Protocol advanced e-commerce hits not showing up in Analytics

I'm having issues with tracking advanced e-commerce transactions through Google Measurement Protocol. I want to use this because we can track sales with the most accuracy if it is done server-side. So we take over the cid from the frontend and track a sale as soon as the payment has been done. I have done this before in the exact same way but for some reason it doesn't work this time, or only works around 50% the time, depending on the tracking ID we use.
I am sending the following payload to: https://www.google-analytics.com/collect (changede UA code for the example):
v=1&t=event&tid=UA-MYCODEHERE-1&cid=532571481.1547156684&el=91901.000001&pr1ca=weekendje-weg&ni=1&uid=1337&pr2qt=1&tr=64.65&pr1br=Some%20Location&pr2va=3%20dagen%20-%20Standaardkamer&pr2id=DRTA-4379&ea=purchase&pr1va=3%20dagen%20-%20Standaardkamer&cu=EUR&ta=Some%20Location&pr2ca=weekendje-weg&pr2nm=Some%20Location%20Somewhere&ec=checkout&pr2br=Some%20Location&pr1pr=158.00&pr1qt=1&ti=91901.000001&pr1id=DRTA-4379&pr1nm=Some%20Location%20Somewhere&pa=purchase&pr2pr=158.00&ts=0
This validates in the Hit builder and using the Debug URL, I log all outgoing measurement protocol hits and they are always triggered and always return a status code 200, I have enhanced e-commerce tracking enabled for the tracking id and no filters there (brand new Analytics account) but my hits never show up for this account in Analytics (even after waiting for days still no single measure).
I'm not sure what's going on, I did this before like this and it always worked fine. Am I missing something? I tried switching to measurement protocol via http or https, GET or POST, etc, it all doesn't help. I did have this exact code working for a older property but it wasn't reliably tracking all transactions, now it's just tracking none. I think I tried everything I could, is this a Google Measurement Protocol/Analytics bug or am I missing something?

Google Analytics counting sessions/views twice?

A site I work with recently saw a doubling of it's direct traffic as recorded in Google Analytics. There doesn't seem to be a obvious external reason for the increase (like some promotion or something) so I'm looking into a possible technical reason.
When loading the homepage and monitoring Real Time Traffic Sources, I see two hits in rapid succession each time I reload the page.
However I'm using the GA debugger extension in Chrome and it's only showing the two expected function calls: ga('create') and ga('send', 'pageview').
The site has other event tracking set up but each event is wrapped in an event listener in JS so they aren't firing automatically. And if they were they should show up in the GA debugger anyway
So I'm at a loss. I can't think of why this is happening, let alone just for direct traffic as opposed to other sources. Anyone have any ideas?
Thanks!

GA shows Bad Event Tracking Code message

since these days, Google Analytics start to show message "Bad Event Tracking Code" for several my projects. Even for one mobile app profile.
The message:
"The Landing Pages report has a (not set) entry. Verify that tracking code for property Mobilni Aplikace sends a _trackPageview hit and that it does this before sending any events."
I didn't change anything in these projects, so I don't understand what Google Analytics want.
Has somebody similar issue?
Thanks
Google Analytics just recently added a means of notifying you of problems so you didn't have to change anything to cause this issue. It could be preexisting.
EDIT: Solution 1 and 2 may help, but what worked was "Solution 3" -- Upgrade to Universal Analytics and increase session length.
Solution 1 - Send less tracking data
If the Google Analytics property is for a high traffic site without Google Analytics Premium you are limited to 10 million hits per month including events Data Limits - Analytics Help. In this case analytics may have recorded a user's event but the pageview was ignored to keep your account within limits.
If you could be flirting with this limit try sending less event tracking by reinventing or removing some event tracking entirely. If you are blatantly violating the data limits track only a subset of users by setting the Sample Rate in your analytics.js (or ga.js) code.
Solution 2 - Find the problematic event code
If you are not going over the data limits you have an event being sent before a pageview.
Methods of debugging "(not set) entry present in reports for property" are described on this page What the value (not set) means - Analytics Help.
Verifying this issue:
Go to the Analytics property with the issue and click Behavior reports > Site Content > Landing Pages
If you see landing page = (not set), this is generally due to a session with no page or screen view level hits included.
It’s possible to have a session that doesn’t include a page or a screen view, but does include another kind of interaction hit type, like an Events or Ecommerce hit type.
Debugging this issue:
Identify which hit type is causing the issue:
use the advanced filter (found at the top of the data table) to
restrict the data to include page/screen views matching exactly 0
For each of these 3 reports:
Behavior > Events
Acquisition > Social > Plugins
Conversions > Ecommerce reports
Note: The "page/screen views" dimension may have disappeared in advanced filters under those reports, I will update this answer when I find out more.
Solution 3 - Session is expiring before user leaves site
You can configure a visitor's session length for your property in Session Settings under Tracking Info.
The default length of time for a session or campaign. An individual session or campaign for a given user ends after the amount of time specified here has passed (counting from the start of the session or campaign), so long as the session or campaign has not been stopped though another means. Learn more about Learn more about session and campaign timeout handling.
If the user's session expires but they haven't left the page and another event triggers there will be no page view before the event has triggered. In this case your site would fall under this category:
The length of a session and campaign depends on your site and business. Here are a few ideas to get you started thinking about session and campaign timeouts:
Lengthen the session time if you have a lot of content and expect users to take a long time engaging with that content. Conversely, shorten the session time if the site has a small amount of content. 5
Increase the session length under Session Settings so these events will still have an associated pageview.
Note: You can only configure the session length if you're using Universal Analytics.
Google Analytics is currently in the process of migrating to a new operating system, the tracking code you have given in the comments appears to be the classic code. based on the information you have given in relation to your application, I believe you would be affected by phase 2 of the migration which has recently taken place
You can find a timeline of migrations along with instructions about how to upgrade your applications the the new analytics.js tracking code here:
https://developers.google.com/analytics/devguides/collection/upgrade/#phase-2

Resources