Why conversion do not appear in real time? - google-analytics

Why do I not see conversion sent by my backend in tab Real-Time > conversions on google analytics?
I am making an HTTP post request to www.google-analytics.com/collect with the following data:
Transaction:
v=1&tid=UA-XXX&cid=faw5242fa9851829581&t=transaction&ti=52525235brgg54&tr=21370.00&cu=PLN
And then one Item:
v=1&tid=UA-XXX&cid=faw5242fa9851829581&t=item&ti=52525235brgg54&in=sofaFromBackend&ip=21370.00&iq=1&cu=PLN
After 24 hours I see them in the Conversions > Ecommerce tab.
Of course, I am writing about Google Analytics Universal

I think you're confusing real-time conversions with transactions. The convertion is the goal that require to be settings. You can't see transaction in Real Time.

Related

Google Analytics - Measurement Protocol - Hits not recognized/visible in Enhanced Ecommerce Reports

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.

Google analytics api V4- I can't see historical data

Google analytics api V4- I can't see historical data
Which may be the reason that I can only see data through the API from a certain date.
From GA, I can see everything without a problem.
What can be the reason that the data is only available from 2018?
I think I found the reason, data settings in GA - Administration -> Service -> Data storage.
I will see after 24h whether they will be visible.

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?

How to retreive session data from Google Analytics Real-time API?

I am looking for a way to get the most up to date possible sessions from Google Analytics.
The standard Google Analytics API as you are probably aware can be hours out of date. I had a look at the realtime dashboard and can't seem to find an rt:sessions/visits. rt:pageviews is close but doesn't give me quite what I need, has anyone found a combination of dimensions/metrics to get realtime sessions from the realtime api?
Thanks!
Google analytics standard reports can take between 24 and 48 hours to complete processing the Google Analytics API (reporting v4 and core v3) are reading from the same data as the Google Analytics standards reports. If the data has not completed processing there is no way for you to get the data. The google analytics api v4 does have a new field in the response called isgolden which will tell you if the data you have requested is done processing or not.
isDataGolden boolean Indicates if response to this request is golden
or not. Data is golden when the exact same request will not produce
any new results if asked at a later point in time.
The Realtime api is very limited in the data that you can get. As you have already stated is a limited number of dimensions and metrics available (Session count is not available only active users). This is due to the fact that these are the ones that processing is not needed on so the data is available for the API to return you. There is also a limitation that I think the Realtime api only contains data over the last five minutes.
There is no other way of getting the data out any faster

Google Analytics Enhanced Ecommerce Questions

I'm trying to implement the Enhanced Ecommerce tracking with Google Analytics and ran into a few questions.
Can you only send impressions with the pageview event? So how would I send impressions of items loaded after the initial pageview event?
I wanted to send product impressions on search result pages, which are in blocks of 10. When I try to send along with the pageview, it never sends, I'm guessing because it's too long for Google, so how would I send multiple at 1 time? I can get upto 6 products and have it still work.
Should I just use an event to track impressions? Would this solve the sending and size issue if I made a call for each product?
Any guidance would be appreciated. I feel the documentation is lacking a bit with some specifics.
You don't need to necessarily send ecomm data with the pageview. As stated here https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce, in the "Sending Enhanced Ecommerce Data" section:
Note: Ecommerce data can only be sent with an existing hit, for example a pageview or event. If you use ecommerce commands but do not send any hits, or the hit is sent before the ecommerce command then the ecommerce data will not be sent.
There's also more information in this SO post: Tracking catalog product impressions - Enhanced Ecommerce Google Analytics.
I'm not sure if there is a hit limit for EE transactions as there are for other types of hits (limit of 500 hits per session), but if you are worried that you'll reach some limit, whether it's EE or not, or if you think you'll send more than 20 hits per second, then you can throttle the hits being sent to Google.

Resources