Analytics receives events, but does not log them in reporting - google-analytics

I've been all over google and SO looking for answers here. I've checked code against google's tracking code suggestions and I've even tested with their sample code. But I cannot get the events to be properly tracked in Google Analytics. My code has been live on the site for some time (~ a month), so this should have overcome any lag on the reports there.
I'm using analytics, the async version, which works fine for page tracking and other 'normal' features. Trying to set up event tracking, I followed the example, and waited a week. Still nothing. I've been debugging and I'm not having any of the 'normal' problems (as far as I can see).
So:
Example tracking code fired:
Play
This triggers an event, which according to ga_debug.js, is fired successfully. Checking the network panel I can see the request and _umt.gif returns status 200.
I've checked the request string in there. All seems good.
But checking GA, there is nothing in the reports. But when you go to GA Realtime > Events, you can see the events being fired!?
I can trigger the events on page or fire them from the console and corresponding events show up in the realtime section, but they have no data (Category, Action or Label).
This is odd, that even firing Google's own example code nothing is showing up.
If anyone has any ideas of where to start debugging for this (or has experience of anything similar), it would be great to hear.

I have been struggling with this issue for three days. I know this thread is old, but I stumbled upon it during my searching. I wanted to post what my personal resolution was in case someone else comes across this.
My Solution:
Here is where I finally found it:
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables
Under: "Using Custom Variables" > "Traditional (ga.js) Snippet" (We are using the ga.js still... for now.)

I had a similar problem and ran into this issue:
https://issuetracker.google.com/issues/35353093
In summary, I was setting the userId property via below. Removing that started historical tracking for me.
ga('set', 'userId', username);

This question gets asked a lot and the answer is almost always "Google Analytics standard SLA is 24 hours". The logs are processed in batch behind the scenes. At peak times, this takes a while.
It can take up to 24 hours for the Google Analytics servers to update -- Source: Google Documentation - Check your web tracking code setup

Related

Bridging the gap between _gaq.push and gtag

Looking more for some fresh ideas to help me troubleshoot the below problem than solving any coding issues (which may come next).
Creating a similar site to an existing one that uses all previous GA tech (analytics.js, _gaq.push, Google_Service_AnalyticsReporting_ReportRequest(), etc) and provides all the easy data needed for my simple GA reports (i.e. page views by date and location).
However, not quite ready to bite off the whole enchilada (GTAGMgr, GA4, and such) so created dual Properties (UA and GA) as many forums have recommended when making the transition.
Setup the website same as the active [UA] site but using the gtag.js (per the Property Tracking Code snippet provided in ADMIN) vs the analytics.js code. Created View(s), new Service Account for the "user", an API Map Key for the Google Map Charts, and any other pieces I could find.
Have the GTAG.JS setup on each page and added any special page tracking via gtag('event', 'page view', {...}) but letting the default page view still occur as well.
Page view hits are coming through as expected EXCEPT the page views locations (City, State, Country, Region) are not being populated. All that comes thru is the "not set" for any location. Ironically, the old analytics.js code was still active initially and location data was being populated.
Would think if gtag.js is collecting standard page view info for the configured Property, that location data would be there as well. Am sure it is but possibly the older getReport calls need tweaking. No doubt I probably have a something not quite right but if REALTIME data shows usage, page views, etc. AND my GA Report calls are working, would think location data would be there too.
Any brainstorming ideas would be appreciated.
Thank you,
LarryG
ANSWER ... the EZ Button ... my code and calls were correct using old and [semi] new way. The majority of the problems were McAfee VPN kicking in. It is set to turn on with reboot and I do not always remember to turn it off. The first obvious clue was the realtime location for my actions were not where they were supposed to be. Also, appears Google API PHP Client has some issues with PHP7.4FastCGI.
So if you took the time to read ... check your VPN settings if you are getting an abnormal amount of NOT SETS in your GA data.
Begs the question ... with the increase in companies providing VPN services out of the box, that renders some of the tracking a moot point.
LarryG

Google Analytics Ecommerce Suddenly Stopped Tracking and I don't know why

I'm asking if anyone is having the same problem as I currently am and if they can help. Currently, for the past 5 days or so, The Google Analytics E-commerce section has not been recoding any payments or revenue when in the back end we know it is happening.
This started when the client added Facebook pixel to the website but was reassured that their IT team did not touch any of the tracking codes for the rest of the website.
Below is the graph of when E-commerce stopped tracking.
I have double-checked the entire flow and double-check the tracking codes to the entire website. But this still hasn't shown what the problem could be.
Any help would be appreciated and has this ever happened to any of you guys as well? This has only happened once about 2 years ago (same client) when E-Commcerce tracking just stopped without a reason and came back about a month after.
Is the tracking hardcoded on the site or are you using Tag Manager?
My guess is the pixel broke some code, I don't know if the GA hardcoded or the dataLayer.
Do a test transaction, on the confirmation page do the following: Right Click on the site > Inspect > Console
Check if you get error, could you paste them here?
Also if you're using GTM, can you type 'dataLayer' on the confirmation page. It should return something.
This is just to understand the problem. I need more info to give you a solution.

Know what the user does when a specific error happens using Google analytics?

I have a website that sells products and I'm using google analytics to know some statistics about the website. Sometimes, errors happens for various reasons and purchases doesn't go through. You then have to refresh the page and try again, then everything works. The website displays the message telling the user to refresh and try again. I'm curious how many people actually do that. My question is, is it possible to know what users do when this error happens? Do they refresh and try again? Do they close the tab or do they do something else?
The question is quite broad at this moment, but there are a couple of improvements to your measurement setup, that can help you to investigate this customer behavior.
What I would do, is to implement an event tracking to indicate, that this error has occurred. You can find details about event tracking in this guide. Although I suppose, that your users are not likely to enter the website at this page, it might be a good practice to set the non-interaction flag of the event, as it is not actually generated by a user interaction.
I'd also create tracking for page reload, either by creating an other event for this, or by adding -reload suffix to these repeated pageview URLs. You can find good resources for this on SO as well, e.g. this one.
If you have a special URL for this error page (e.g. purchase-error.html instead of purchase-success.html), it is also easy to track the exit rate specific to this page.
Besides of Google Analytics, you might also want to set up heatmap or screen recording tools to understand this behavior. Hotjar, Lucky Orange are a few examples. (No affiliation.)

Google Tag Manager - Tag Firing Way too Many Times

We are having an issue with our tracking on www.x3tradesmen.com where a Google Tag Manager tag is firing way too many times and we cannot determine why...
We only have one website event tag linked to Google Analytics called Form Submit and typically we would receive between 2-10 Form Submit events per day at the most, however, recently we have noticed that the tag is firing 1000's of times sporadically and we cannot pinpoint the issue. We have also noticed that our users have drastically increased for short time periods (minutes/hours). We typically only get 40-80 users per day on our website but we saw a massive spike of around 400 users in less than one hour once.
We recently added the facebook pixel via GTM and that is really the only change that we have made and now we are seeing these issues. Does anyone know of any common reasons to why this would be behaving this way or can anyone see any major issues with our implementation of GA or GTM on our website that would cause this?
I know this information is vague, so please let me know if there is specific information that would help identify the issue.
Thanks in advance!
Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5
I presume it is the FB pixel - Facebook automatically collects information in addition to what you have configured yourself and uses post/submit events to send them. You can disable that behaviour as per documentation and see if it makes a difference:
Automatic Configuration
The Facebook pixel will send button click and
page metadata (such as data structured according to Opengraph or
Schema.org formats) from your website to improve your ads delivery and
measurement and automate your pixel setup. To configure the Facebook
Pixel to not send this additional information, in the Facebook Pixel
Base code, add fbq('set', 'autoConfig', 'false', '')
above the init call.
I had a similar issue where suddenly additional submit events turned up in the GTM preview pane that I finally tracked down to FB, so there is a good chance that yours is the same problem.

Google analytics _trackSocial not working

I have correctly included the GA tracking code snippet found here (http://support.google.com/analytics/bin/answer.py?hl=en&answer=1008080&rd=1) and it is working (& has been for years)
I have recently set up the Facebook Javascript SDK for running code when the 'like' button is clicked - this also works.
In the same FB.Event function, I included googles _gaq.push _trackSocial as follows...
FB.Event.subscribe('edge.create',
function(response) {
// do some stuff, this is working.
// google track likes - this isn't working
_gaq.push(['_trackSocial', 'facebook', 'like']);
}
);
No errors in console.
So either analytics takes a long time to register the likes & I haven't waited long enough or something is wrong.
Since the FB.Event & my JS functions ARE WORKING & _gaq.push does not give any errors - I am unsure what the problem is.
In Google Analytics Traffic Source > Social > Social Plugins then click on the 'Social Source' tab & it shows only Google.
24 hours later the answer is evidently that Analytics takes a long time to update.
Although I have not changed anything Analytics is now showing Facebook as a Social Plugin.
So it just takes a really long time to show up in analytics.
If you're using the 'newer' analytics.js vs the legacy ga.js version you need to use ga('send'...) instead of _gat.push(...).
I would have expected you to get an error in your situation, but this may help others.
ga or _gaq.push for Google Analytics event tracking?
If you're trying for instance to use the social-tracking.js from StuffedWeb alongside analytics.js then you'll need to convert it to the new call style.

Resources