Reputation: 772
This is the code being sent from our confirmation page for GA universal using enhanced ecommerce:
ga("create", "UA-XXXXXXX-xx", "auto");
ga("require", "displayfeatures");
ga("require", "ec");
ga("ec:addProduct", {
Id: null,
Name: "ProductNameTest",
Brand: "Foo",
Category: null,
Variant: null,
Price: 5.49,
Quantity: 1,
Coupon: "",
Position: 0
});
ga("ec:setAction", "purchase", {
Id: "33558",
Affiliation: "Foo",
Revenue: 5.49,
Tax: 0,
Shipping: 0,
Coupon: "",
List: null,
Step: 4,
Option: null
});
ga("send", "pageview");
I'm not seeing any issues in the GA debugger or in the Tag Assistant plugin for Chrome.
What am I missing here that our conversion data/transactions aren't showing up?
EDIT:
Here is the output from the GA debugger that I stripped for the above:
Initializing Google Analytics.
Loading resource for plugin: ec
Loading script: "http://www.google-analytics.com/plugins/ua/ec.js"
Running command: ga("create", "UA-XXXXXXX-xx", "auto")
Creating new tracker: t0
Running command: ga("require", "displayfeatures")
Set called on unknown field: "dcLoaded".
Plugin "displayfeatures" intialized on tracker "t0".
Running command: ga("require", "ec")
Waiting on require of "ec" to be fulfilled.
Executing Google Analytics commands.
Registered new plugin: ga(provide, "ec", Function)
Running command: ga("require", "ec")
Plugin "ec" intialized on tracker "t0".
Running command: ga("send", "pageview")
Upvotes: 0
Views: 2773
Reputation: 9603
I see a few issues that could be affecting your transactions:
ga("require", "ec")
commands.Id
for addProduct
is null. This is a required value, and should be a string.ga("send", "pageview");
EDIT:
Regarding point #2, the Id
for addProduct
CAN be null, if the developer is passing a value for the name parameter instead (see Product Data table).
All property key's must be lowercase i.e. Id
should be id
. (Thanks for Eduardo for pointing out).
Upvotes: 4