I'am trying to use Enhanced Ecommerce to track the e-commerce statistics of a webshop. We have some orders that are automatically triggered through a backend system. To measure these transactions we are using webrequests to send the data to Google Analytics.
This is based on some of the code provided by https://gist.github.com/0liver/11229128
I'm using the following parameters to register this transaction:
v=1 // Version.
&tid=UA-XXXXX-Y // Tracking ID / Property ID.
&cid=555 // Anonymous Client ID.
&t=pageview // Pageview hit type.
&dh=mydemo.com // Document hostname.
&dp=/receipt // Page.
&dt=Receipt%20Page // Title.
&ti=T12345 // Transaction ID. Required.
&ta=Google%20Store%20-%20Online // Affiliation.
&tr=37.39 // Revenue.
&tt=2.85 // Tax.
&ts=5.34 // Shipping.
&tcc=SUMMER2013 // Transaction coupon.
&pa=purchase // Product action (purchase). Required.
&pr1id=P12345 // Product 1 ID. Either ID or name must be set.
&pr1nm=Android%20Warhol%20T-Shirt // Product 1 name. Either ID or name must be set.
&pr1ca=Apparel // Product 1 category.
&pr1br=Google // Product 1 brand.
&pr1va=Black // Product 1 variant.
&pr1ps=1 // Product 1 position.
based on the information provided by https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide below the header Measuring Purchases.
All these values are coming in fine but I also want to register the product prices for each individual product in the transaction.
So according to Parameter Reference I can add it by using the Product Price parameter in combination with a product index.
usage:
pr<productIndex>pr=29.20
resulting in e.g. pr1pr=59.00
I made sure the prices are formatted correctly. Using only decimals and no comma's, but no price values are registering in Google Analytics.
Can the product prices be registered this way? Should I use a different approach to fix this problem?
So the data send by the console app is showing up in the Google Analytics Report. The way I build up the parameters seems to work just fine. Something else is going wrong in my application, irrelevant to Google Analytics. Thanks for your time DalmTo.