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
Related
We have a problem with E-Commerce transactions sometimes not beeing set in relation to an ad click ("cpc"). They appear instead with the Channel/Medium "direct". This is a problem as we cannot correctly link our revenue to the costs spend on Google Ads.
We got a payment system that allows buyers to safely pay to sellers, and we get a fee percentage of the payment volume (similar like PayPal). We get our fees as soon as a pay-in is successful. Because our users can pay via bank wire as well it may take one or two days until we actually get our fee. This is why ecommerce transactions are not sent from the frontend to GA (on a thank-you page like in online shops), but from our server directly to GA as soon as a payment succeeds.
This is the GET call our server does when a payment succeeds:
GET https://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-1&cid=1746XXXXX.1593XXXXXXX&t=transaction&ti=mytransactionID&tr=1&cu=USD
Here is a small diagram that explains the process:
We use cross-domain tracking, and the GA Client ID of the users stay the same when they get redirected from mydomain.com to app.mydomain.com, so this should not be the problem. What I assume is, that when a user clicks on an ad, the gclid of the ad is lost. Is there a way to manually send the gclid ID to Google Analytics? I would store the gclid then as well in our payment. Or is there another (maybe better way) to send transactions to GA?
Your transaction hit will only be attributed to ad-click session if payment occurs in a 30-minutes interval since the last hit with the same ID. Otherwise, the transaction hit would start a new session. Due to 'last-non-direct' rule the new session would only be associated with "cpc" channel if there were no other intermediate sessions after ad click. Please check the Google Analytics extensive overview for deeper insight.
Storing and passing gclid might help, however, this might result in some discrepancies in cost reporting since there would be several sessions for the same click. In the case of passing gclid it's recommended to pass at least two hits:
a simple pageview hit with a dummy location parameter containing gclid
and then later a transaction hit with the same location paraeter. In that case you'll be able to see your transactions as a separate sessions with a distinct landing pages
You should make sure you're using the GA client id in the Measurement protocol hit to ensure the hit gets stitched to the other hits of that user.
Now regarding reporting: Google Analytics uses the attribution model "Last non-direct Click", despite the hit being sent later, GA will ignore direct and use the previous touch point which should be the PPC campaign.
There shouldn't be an issue there. Which report are you using to see the transaction appear as direct, rather than Paid Search?
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?
I've been looking into offline tracking of google analytics goals. I want to implement this in a similar way to how call tracking companies do and I'm guessing the GCLID is the answer.
If I store the GCLID of every visitor that comes to our website in the database alongside some info about their session and then identify their session at a later date as one that produced an offline goal, can I then generate a goal from that?
My thinking is that if I had a button in our CRM system that when I click it opens up an invisible iframe that links to mysite.com/goalurl.html?gclid=xxx then analytics on that page would track a goal on that page but attribute it to the original click that the other user made on our PPC advert. Theoretically I could do this 10 times in a row for 10 different sessions and they would all be tracked as if the 10 original owners of those GCLIDs has visited the goal page, right?
Am i missing something here? Would this not work because Google would spot that they all came from the same IP address, or because I would have the same GA cookie on my machine? Or does Gogole not care about any of that?
Any help would really be appreciated.
I am not sure if it works with the gclid but would also be interested in the answer.
Besides that, a possible solution is to store the Analytics client ID in your own database and, whenever there is a conversion, sending that conversion data (referencing the recorded client ID) directly from your server to Analytics by using the Measurement Protocol.
Exactly this topic is a case study in the book "Google Analytics Breakthrough: From Zero to Business Impact".
We are implementing a native analytics system and want to apply the same tracking principles Google Analytics uses. We've figured everything out but one thing:
Every time I refresh a page with an url that has utm-parameters attached to it, Google Analytics somehow figures out that it's not actually a visit but the same page that gets refreshed and shows only one visit in its dashboard from that particular source.
Is anybody aware how GA specifically does that so I can replicate it in our system?
I know that I can use
performance.navigation.type
in my JS script, but it doesn't give me desired results.
Any help would be much appreciated.
Attribution in GA happens on the Google servers, so JavaScript will be of limited use. Basically since a reload means that the user has the same client id and no change in the channel (source, medium and campaign are the same as in the previous visit) the existing session will be continued (a change of campaign/source information would trigger a new Google Analytics session).
Google has a very nice chart that explains how campaign information and traffic source information is processed.
On of our products has been built using Angular.js. All tracking tags, including Google Analytics, are fired through a GTM container. We are using Turbolinks, so page changes within the site are loaded via ajax, although the URL does change. It's not strictly a Single Page Application, but we do use a virtual pageview event in GTM instead of a regular trigger.
Analyzing user paths on BigQuery revealed that we have an issue with session continuity, whereby users who trigger an event in the middle of a chain of pageviews will be treated by GA as being 2-3 distinct sessions, even though they occur within a 30 minute window.
How can we prevent this ?
You are correct that a Session shouldn't timeout for 30 minutes, but there are actually three reasons why a User's Session can come to an end.
They didn't interact for more than the Session Timeout time (This is usually 30 minutes).
They passed midnight (this is just to keep things tidy).
Their Source changes (so, for example, they navigate to your site by Google and by Facebook in the same Session).
Any of these could be causing your issue. I recommend you do the following:
Check that no-one has edited the Session Timeout setting.
Ensure midnight is defined in a sensible place for your site, and isn't near the Sessions that you're worried about.
Inspect these Sessions' Source field, to see if and why it changed. You may find that you issue is an inadvertently campaign tagged internal link.
For more information:
https://support.google.com/analytics/answer/2731565