Google measurement protocol transactions not being recorded
Asked Answered
C

2

6

I am issuing GET requests as defined in the Google Measurement Protocol from our server to record offline conversions.

The following test request (tracking id obfuscated)

https://www.google-analytics.com/debug/collect?v=1&tid=xx&cid=111300&t=transaction&ti=1500000&tr=100

validates against the /debug Endpoint (using Postman)

{
  "hitParsingResult": [ {
    "valid": true,
    "parserMessage": [ ],
    "hit": "/debug/collect?v=1\u0026tid=xxu0026cid=111300\u0026t=transaction\u0026ti=1500000\u0026tr=100"
  } ],
  "parserMessage": [ {
    "messageType": "INFO",
    "description": "Found 1 hit in the request."
  } ]
}

And shows up in the Sales Performance report in Google Analytics when submitted to the production endpoint using PostMan (i.e. without /debug/)

However I can't see any of the actual production data, submitted from the server in the Sales Performance report.

Any ideas?

Corbitt answered 13/3, 2017 at 7:47 Comment(5)
How long did you wait it takes 24 to 48 hours for data to show up in the standard reports.Brenna
Thanks - thought there might be a delay. I'll check in a day or so.Corbitt
Hi matthew, what kind of ecommerce are you using (classic/enhance)? For example, if you view has enabled the enhanced ecommerce it's better to send that information attached to a hit type event or pageview (transaction is for classic ecommerce tracking)Vapor
@KemenPaulosPlaza. Its enhanced eCommerce. Transaction is a valid value as per the documentation? developers.google.com/analytics/devguides/collection/protocol/…Corbitt
@MatthewEvans What data are you actually trying to see with this hit? I don't think there will be any data except for transaction id and revenue. Can you please specify ?Asp
V
3

This is kind of tricky, yes the transaction is valid,but the debuger only check the syntaxis, but your Google Analytics configuration has not enabled that type of hit (t=transaction, That is only for Standart E-commerce). In my test account, I run that hit and this work. In your case, if your account is enhanced e-commerce is being filtered on the processing.

So here is a screeshot of you hit on my test view running on classic ecommerce. enter image description here

So you have 2 options to fix this, downgrade you e-commerce (not recommendable in all the cases)

Downgrade

If you do want to use that syntaxis, you have to uncheck the enhance e-commerce and that should work in your case. With your hit and with my configuration this works (a new account w/no filter and standard e-commerce enabled)

Attach information

The enhanced ecommerce was designed to be send attached with other hits (on event or pageview mainly).

For example, this hit is a no interaction event and it's valid for receive transaction and the purchase. Use no interaction events avoid fake sessions and allows to you import the data of the transaction without alter metrics as bounce rate. https://www.google-analytics.com/collect?v=1&t=event&ni=1&ec=Ecommerce&ea=Transaction&cid=2.2&tid=UA-xxxxx-1&ti=T12345&tr=35.43&pa=purchase

enter image descriptio[![enter image description here

Vapor answered 10/4, 2017 at 14:10 Comment(6)
Thanks I will test this and report backCorbitt
Ok - I have fired off a few test hits using this request structure in PostMan. Shouldn't I be able to see these in realtime event reporting. Have you seen your events in the Sales Performance report yet?Corbitt
Hi I'm back, Sadly we can't see the transaction on realtime :(, but I've tested on a new test account, and the explorer report only took 15 min to get updated. But back to my answer, that url won't work, due the missing of the PA (Product Action), that is mandatory to add the enhance ecommerce as transaction (thanks you BigQuery for this tip), now it is working. Now i've edited it with more info.Vapor
Thanks - I'll test the full implementation.Corbitt
No luck in the view I was using. Note though that I am using UID (User Id) not CID. The transactions seem to be visible in the view with User ID enabled.Corbitt
@MatthewEvans, Sorry for the late response, I'm just jumping in after easter. Buh! but in that case, you only need to add the CID and the UID on the call (both), in other hands the transaction must be stored on the regular view ( during the creation of the UID view you Google Forced to have both) . So try that google-analytics.com/…Vapor
B
1

There is a data latency with Google analytics. Officially its 24 - 72 hours before data shows up in the standard reports.

From my own experience I can say depending upon how much data there is in your account you can see it as early as 12 - 24 hours.

If the debug end point says its a valid it you can assume its working fine.

Brenna answered 13/3, 2017 at 12:56 Comment(1)
@DalmTo I am still not seeing this data in the Ecommerce / Sales performance reports. Any other ideas?Corbitt

© 2022 - 2024 — McMap. All rights reserved.