google-analyticsmeasurement-protocolenhanced-ecommerce

Google Analytics Measurement Protocol ignores products


I am using the Google Measurement protocol to send successful transactions from delayed payments to the analytics server. Everything works fine except for the product information that just wont show up in Google Analytics.

I have already checked if Advanced e-commerce is enabled in Analytics and tried several basic examples from the site, but nothing sticks. I used the following string (UA-ID is fake for obvious reasons.):

v=1&t=transaction&tid=UA-12345678-1&cid=b499f0c3-792c-4e4f-a717-d2a85ac55504&ti=250303&tr=105&tt=10&ts=5&cu=EUR&ds=web&pr1id=testsku&pr1nm=test%20product%20description&pr1ca=hardware&pr1pr=100&pr1qt=1

The measurement protocol hit builder says its a valid request, and the transaction also shows up in GA, but the actual products are missing:

enter image description here I have already contacted Google Analytics support, but they had no idea :).


Solution

  • I figured it out after all. The problem is that you need to set the Product Action for it to work. If you dont set this parameter, all product data will be ignored. You can set this to detail, click, add, remove, checkout, checkout_option, purchase or refund.

    Working example:

    v=1&t=transaction&tid=UA-12345678-1&cid=b499f0c3-792c-4e4f-a717-d2a85ac55504&ti=250303&tr=105&tt=10&ts=5&cu=EUR&ds=web&pr1id=testsku&pr1nm=test%20product%20description&pr1ca=hardware&pr1pr=100&pr1qt=1&pa=purchase

    To bad Google did not check for this in there Hit builder. that would have saved me a lot of time.