I recently created a new Google analytics account for testing purpose and for this account(tracking id) sending event hit, pageview hit and exception hit using measurement protocol(server-side protocol) is working and I am able to view statistics in google analytics.
But when I try to use tracking id from an old google analytics account (which is used in my production environment and it has been used to send event hit and pageview hit using analytics.js), google analytics doesn't show event hits or pageview hits sent using measurement protocol(server-side protocol).
Any help will be appreciated. Do we have to enable accepting requests from measurement protocol somewhere in google analytics or developer console settings?
I just had the same issue while testing on the hit builder tool, and the issue was that I was filtering my IP from Analytics so the events weren't showing on the real time dashboard. I removed the filter and the events started showing up.
Related
I am trying to send event data to Google Analytics 4 through a Google Tag Manager Server container. This setup will later be used to track an app for which we will not be using the Google SDK. However whatever I try, I can't seem to record users within GA4, even though the events are recorded.
Currently, I send an HTTP POST request from Postman to our Google Tag Manager Server container, which is captured by a custom Client and is processed by the official GA4 tag. Within the GA4 tag, I map the original event data to the event data needed by GA4. The request that is sent is shown below:
Also, GTM shows a 204 response code.
When the GA4 tag sends the request to GA4, I do see the event coming in, but no user is recorded:
Which parameters am I missing that are required?
(Yes, I know that there are dedicated App streams within GA4, but you have to connect your account to Firebase, which is exactly what we do not want for our setup. Therefore, I set up a web stream.)
Google referred me to this forum, since they did not have a solution to the following issue.
So the issue we are facing is that hits send via the measurement protocol are registered by Google Analytics in the real-time- and events reports, but those hits are not captured in the Enhanced Ecommerce reports (especially the shopping/checkout reports). However, hits that are send via the hit builder are reported by GA in both the event and real-time reports as in all the Enhanced Ecommerce reports.
Detailed description
20th of June: An user (ClientID: 945403652.1592644568/userID 1234567890) completed an
application (checkout step 1, application) on the website for the vacancy with name 'developer' and id
'12345'.
2th of July: With use of the measurement protocol an
offline event for completing the job interview stage (checkout step 3, 'gesprek') is send
to Google Analytics. The hit is recorded and visible in the events and real-time reports but is not visible in the enhanced ecommerce reports.
The following hit was send via the measurement protocol with a GET request:
v=1&t=event&tid=UA-123456-1&cid=945403652.1592644568&cd20=945403652.1592644568&uid=1234567890&cd8=1234567890&cd7=gesprek&ec=measurement%20protocol&ea=checkout&el=step_3&ev=1234&ni=1&pa=checkout&pr1id=12345&pr1nm=developer&pr1br=12345&pr1ca=development&pr1va=amsterdam&pr1cd10=3771&pr1cd11=hbo&pr1cd12=5-10%20jaar&pr1cd13=32-40%20uur&pr1cd15=2019-07-04%2016%3A23%3A24&pr1cd18=3500%20-%205000%20euro&pr1cd19=gesprek&cos=3
7th of July: We send the same hit for completing step 3 of the
checkout via the hit builder. The hit is visible in the real-time and events report and is
somehow captured by all the Enhanced Ecommerce reports as well.
Other notes:
Enhanced Ecommerce is enabled in GA
Checkout steps are defined in GA.
We currently see some transaction hits that are send with the MP coming into the GA enhanced
ecommerce - sales reports, but those hits are also not visible in the
checkout/shopping behaviour reports.
Does anyone knows what causes this issue and how this issue can be solved?
Many thanks.
I did some testing with your hit, both with the hit builder and a system I created in Apps Script and, as I imagined, there is no difference as the parameters are the same.
The result was always that the events were in Real Time report and in the Events report but not in the Enhanced Ecommerce report.
However, looking at the parameters I noticed that the event is non-interaction. By removing the ni parameter and sending a new hit, the information also appeared in the Enhanced Ecommerce report.
This is because the checkout report is session based but a non-interaction event does not generate any session (here you can find a study I did some time ago: https://www.analyticstraps.com/utenti-senza-sessioni/).
So, so what I hypothesize may have happened is that in one case (2th of July) only the non-interaction event was sent (and did not appear in the ecommerce report), while in the other case (7th of July) it was sent either before or after an interaction hit (for example a pageview or other event) or a session of that user was in progress, therefore the event was associated with that session and appeared in the Enhanced Ecommerce reports.
I am trying to use the Google Analytics Measurement Protocol to record some events happening on my server-side code. I am using the REST API as suggested here but I don't see any events on the Google Analytics dashboard.
When I try to add the event via the Google Analytics Hit Builder, then I am able to see that event in the dashboard.
I don't think any authentication is required while using the REST API and only a correct tracking ID is required which is present. I have confirmed that the POST request is not failing.
I am looking at the Realtime > Events to check whether the events are pushed or not. Is there a place where I can check the historical data to see if the events are present there.
Thanks!
We are tracking events and screenviews using Firebase Analytics and Google Tag manager (GTM). GTM will then send the hits to Google analytics (GA).
I believe we have correctly setup the GTM tags needed, inserted the code and installed what needs to be installed as instructed here.
I am now moving on to test if the hits are properly sent by GTM to GA. And we opt to use Charles Proxy to record the hits. Although we can see hits to GA getting recorded, we can't see the parameter 'gtm' from the request. For example, for screenview, the request sent to GA was like this:
is this expected? Or should we see the GTM Container ID with the request for us to confirm that our setup is working correctly?
Also, is there any other way for us to check if the hits sent to GA is from GTM?
Thank you so much!
We provide an iframe-based embeddable widget to our clients and want to be able to send their Google Analytics account events based on what is happening inside our iframe. We used to be able to do this using the old ga.js with the following code:
_gaq.push(['NAMESPACE._setAccount', CUSTOMER_GA_ACCOUNT_ID]);
_gaq.push(['NAMESPACE._setDomainName', CUSTOMER_DOMAIN]);
_gaq.push(['NAMESPACE._trackEvent',"category", "event", "label"]);
This code would be fired inside our iframe, but would result in an event being pushed to the customer's google analytics account, letting them have some insight into customer behavior inside our embeddable widget. The NAMESPACE in front of the actions would keep these events separate from our GA stuff, and would prevent our GA stuff from going to their GA account. They would provide us with their Google Analytics account ID when they wanted to enable this feature.
Is there a way to do something similar with the new Universal Analytics API?
I don't seem to see a similar way to namespace actions and the cross-domain tracking documentation doesn't indicate how to send events/pageviews to two domains/GA accounts (ie we want to track pageviews on our GA account, and send the events to our customer's GA account).
I suggest going the roundabout way - set a pixel in your widget and make the actual endpoint for that pixel a script on your server that sends the data via the measurement protocol to your clients analytics account.