| Issue 376: | Set called on unknown field: "items" | |
| 55 people starred this issue and may be notified of changes. | Back to list |
--------------------------------------------------------------------------- NOTE: This issue tracking system is for Google Analytics developer products only. If you are not a developer/programmer visit: http://www.google.com/analytics/support.html --------------------------------------------------------------------------- Name of affected component: Google Analytics (Beta) - Ecommerce Tracking Name of related library and version, if applicable (e.g. Java, Python, HTTP, Objective-C, etc.): Javascript Issue summary: On adding item for ecommerce tracking, API raise an error: Set called on unknown field: "items". Steps to reproduce issue: 1. Setup analytics code on website. 2. Include ecommerce via require signal 3. Add transaction 4. Add item (raise error) 5. Send data (signal not registered with analytics server, not even for transaction) Expected output: Data being tracked in analytics account Actual results: No data visible Notes: Able to replicate by using sample code in the documentation.
Jan 14, 2014
#1
[email protected]
Feb 5, 2014
likewise here - if we remove custom variable name/val pair from the beacon the data is tracked as expected.
Feb 6, 2014
same here
Feb 13, 2014
I have also started getting this error and it related to the 'name' parameter in the AddItem. Right now i can see the transaction being updated in the Analytics but the quantity field is not updated as it is related to AddItem.. I get this error: Running command: ga(ecommerce:send) analytics_debug.js:9 Set called on unknown field: "items". The transaction is added fine: adSenseId (&a) 207276765 analytics_debug.js:9 apiVersion (&v) 1 analytics_debug.js:9 clientId (&cid) 1565176868.1392320490 analytics_debug.js:9 ec:affiliation (&ta) TeamRaiser Donation analytics_debug.js:9 ec:id (&ti) 1405 analytics_debug.js:9 ec:revenue (&tr) 5.14 analytics_debug.js:9 ec:shipping (&ts) 0.0 analytics_debug.js:9 ec:tax (&tt) 0.0 But the Item is not added and this is what i see in the console <unknown> (&ic) 1440 analytics_debug.js:9 <unknown> (&in) HtsDonationForm analytics_debug.js:9 <unknown> (&ip) 5.14 analytics_debug.js:9 <unknown> (&iq) 1 analytics_debug.js:9 <unknown> (&iv) 1201
Feb 19, 2014
I am also getting the same error. Does anyone find the solution for this issue ?
Feb 19, 2014
same here
Feb 20, 2014
We're having the same problem on a site that's being developed in a subfolder of the old site's main domain. (site.com/beta)
The old site (site.com) has ga.js analytics code if that matters.
Here is the tracking code (located after the thank you page content):
<script type="text/javascript">
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': '1392907062',
'affiliation': 'site.com',
'revenue': '410.00',
'shipping': '0.00',
'tax': '82.00',
'currency' : "HRK"
});
ga('ecommerce:addItem', {
'id': '1392907062',
'name': 'shop .001.item',
'sku': 'ROBA018971',
'category': 'HLAČE',
'price': '410.00',
'quantity': '1'
});
ga('ecommerce:send',{'hitCallback': function() {alert("ecommerce") ;}});
</script>
Does it matter that this code is placed after the page content and main analytics script is in header?
Feb 21, 2014
Anybody have any luck? @ivan, the main analytics.js should be in the head, so you should be good. I have made sure to add the 'currency': 'USD', tried adding a callback function to indicate success... After adding the analytics debug extension to Chrome, I see my values are all correct, but as @gaurav posted in #4, it's the actual addItems definition that's not working – and I've seen several posts complaining of the same with no resolution.
Feb 21, 2014
Just for all those who have not solved, make sure that Analytics Ecommerce is enabled in the account if you weren't the one who set it up. ugh!
Feb 21, 2014
Hi Greg, the Ecommerce is already enabled and the Transactions are working fine for me. Its only the AddItem function which is throwing me an error did you get it working ??
Feb 21, 2014
Hi @gaurav, I had the exact same reporting issues as you mentioned in #4 (above) with the exception of my variables were populating correctly but Google's ec:id, ec:name, ec:sku, ec:category, ec:price, and ec:quantity were all <unknown>.
Since I hadn't setup the GA account, it never occurred to me that E-commerce was not 'ON', which obviously has something to do with addItems being instantiated.
My code will look a little different since I am using segment.io, but you can compare to see if there's something missing from your snippet:
$script .= <<<EOF
analytics.ready(function (){
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': '{$transaction['id']}',
'affiliation': '{$transaction['affiliation']}',
'revenue': '{$transaction['revenue']}',
'shipping': '{$transaction['shipping']}',
'tax': '{$transaction['tax']}'
});
ga('ecommerce:addItem', {
'id': '{$order_items['id']}',
'name': '{$order_items['name']}',
'sku': '{$order_items['sku']}',
'category': '{$order_items['category']}',
'price': '{$order_items['price']}',
'quantity': '{$order_items['quantity']}'
});
ga('ecommerce:send');
});
EOF;
Feb 26, 2014
I'm seeing the same issue. Set called on unknown field: "items" ecomerce is enabled but I'm also getting the error. Set called on unknown field: "items"
Mar 4, 2014
+1 for me the items fields are all showing up as <unknown>, except for ec:id.
Mar 4, 2014
Related https://productforums.google.com/forum/#!topic/analytics/3iBlnhNZT4A
Mar 4, 2014
Ive just confirmed, this issue occurs even when using the examples found on the developer guidelines https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce
Mar 5, 2014
I can confirm this. Both with my own code and the sample code from dev guidelines.
Mar 12, 2014
I too like to confirm this. Tested with and without GTM using own and sample code from the guidelines.
Mar 12, 2014
I also would like to confirm this
Mar 20, 2014
+1 I see it in the logs when I turn on the debugging extension. Does this mean the data is not being sent? Executing Google Analytics commands. analytics_debug.js:9 Running command: ga(ecommerce:addTransaction, [object Object]) analytics_debug.js:9 Executing Google Analytics commands. analytics_debug.js:9 Running command: ga(ecommerce:addItem, [object Object]) analytics_debug.js:9 Executing Google Analytics commands. analytics_debug.js:9 Running command: ga(ecommerce:send) analytics_debug.js:9 Set called on unknown field: "items".
Mar 21, 2014
We experience the same issues, very annoying.
Mar 21, 2014
Hey Guys, I have just found out that this error only corresponds to certain UA accounts. I used the same code for another client on the same platform and it works perfectly fine. I used exactly the same code as I discussed before in this thread...!!
Mar 24, 2014
(No comment was entered for this change.)
Status:
Accepted
Mar 26, 2014
Tried to create new account couple of times with no luck. How is this medium priority when ecommerce is not working for some users?
Mar 29, 2014
Initializing Google Analytics. analytics_debug.js:9 Registered new plugin: ga(provide, "linker", Function) analytics_debug.js:9 Registered new plugin: ga(provide, "displayfeatures", Function) analytics_debug.js:9 Loading resource for plugin: ecommerce analytics_debug.js:9 Loading script: "http://www.google-analytics.com/plugins/ua/ecommerce.js" analytics_debug.js:9 Running command: ga(create, UA-49506235-1, 99-dot-com-website-testing.com) analytics_debug.js:9 Creating new tracker: t0 analytics_debug.js:9 Running command: ga(send, pageview) analytics_debug.js:9 Sent beacon: v=1&_v=j17d&a=1131207009&t=pageview&_s=1&dl=http%3A%2F%2Fwww.99-dot-com-website-testing.com%2Forderstatus.php%3Fid%3D5545&ul=en-us&d…77548975&_u=MCCC~&cid=1617463431.1396013038&tid=UA-49506235-1&z=1142524443 analytics_debug.js:9 adSenseId (&a) 1131207009 analytics_debug.js:9 apiVersion (&v) 1 analytics_debug.js:9 clientId (&cid) 1617463431.1396013038 analytics_debug.js:9 encoding (&de) UTF-8 analytics_debug.js:9 flashVersion (&fl) 12.0 r0 analytics_debug.js:9 hitType (&t) pageview analytics_debug.js:9 javaEnabled (&je) 1 analytics_debug.js:9 language (&ul) en-us analytics_debug.js:9 location (&dl) http://www.99-dot-com-website-testing.com/orderstatus.php?id=5545 analytics_debug.js:9 screenColors (&sd) 24-bit analytics_debug.js:9 screenResolution (&sr) 1366x768 analytics_debug.js:9 title (&dt) 99TShirts analytics_debug.js:9 trackingId (&tid) UA-49506235-1 analytics_debug.js:9 viewportSize (&vp) 1366x412 analytics_debug.js:9 Running command: ga(require, ecommerce, ecommerce.js) analytics_debug.js:9 Waiting on require of "ecommerce" to be fulfilled. analytics_debug.js:9 Executing Google Analytics commands. analytics_debug.js:9 Registered new plugin: ga(provide, "ecommerce", Function) analytics_debug.js:9 Running command: ga(require, ecommerce, ecommerce.js) analytics_debug.js:9 Plugin intialized on tracker "t0". analytics_debug.js:9 Running command: ga(ecommerce:addTransaction, [object Object]) analytics_debug.js:9 Running command: ga(ecommerce:addItem, [object Object]) analytics_debug.js:9 Running command: ga(ecommerce:send) analytics_debug.js:9 Set called on unknown field: "items". analytics_debug.js:9 Sent beacon: v=1&_v=j17d&a=1131207009&t=transaction&_s=2&dl=http%3A%2F%2Fwww.99-dot-com-website-testing.com%2Forderstatus.php%3Fid%3D5545&ul=en-us&d…9506235-1&ti=15499-ORD&ta=99Tshirts&tr=5600&ts=0.00&tt=228.32&z=1928730599 analytics_debug.js:9 adSenseId (&a) 1131207009 analytics_debug.js:9 apiVersion (&v) 1 analytics_debug.js:9 clientId (&cid) 1617463431.1396013038 analytics_debug.js:9 ec:affiliation (&ta) 99Tshirts analytics_debug.js:9 ec:id (&ti) 15499-ORD analytics_debug.js:9 ec:revenue (&tr) 5600 analytics_debug.js:9 ec:shipping (&ts) 0.00 analytics_debug.js:9 ec:tax (&tt) 228.32 analytics_debug.js:9 encoding (&de) UTF-8 analytics_debug.js:9 flashVersion (&fl) 12.0 r0 analytics_debug.js:9 hitType (&t) transaction analytics_debug.js:9 javaEnabled (&je) 1 analytics_debug.js:9 language (&ul) en-us analytics_debug.js:9 location (&dl) http://www.99-dot-com-website-testing.com/orderstatus.php?id=5545 analytics_debug.js:9 screenColors (&sd) 24-bit analytics_debug.js:9 screenResolution (&sr) 1366x768 analytics_debug.js:9 title (&dt) 99TShirts analytics_debug.js:9 trackingId (&tid) UA-49506235-1 analytics_debug.js:9 viewportSize (&vp) 1366x412 analytics_debug.js:9 Sent beacon: v=1&_v=j17d&a=1131207009&t=item&_s=3&dl=http%3A%2F%2Fwww.99-dot-com-website-testing.com%2Forderstatus.php%3Fid%3D5545&ul=en-us&d…90111&ic=Couple%20Tshirt&iv=Couple%20%20T-shirts&ip=560&iq=10&z=1546816423 analytics_debug.js:9 <unknown> (&ic) Couple Tshirt analytics_debug.js:9 <unknown> (&in) 99-RF-100112-190/SJ:99-200122-190/SJ-990111 analytics_debug.js:9 <unknown> (&ip) 560 analytics_debug.js:9 <unknown> (&iq) 10 analytics_debug.js:9 <unknown> (&iv) Couple T-shirts analytics_debug.js:9 adSenseId (&a) 1131207009 analytics_debug.js:9 apiVersion (&v) 1 analytics_debug.js:9 clientId (&cid) 1617463431.1396013038 analytics_debug.js:9 ec:id (&ti) 15499-ORD analytics_debug.js:9 encoding (&de) UTF-8 analytics_debug.js:9 flashVersion (&fl) 12.0 r0 analytics_debug.js:9 hitType (&t) item analytics_debug.js:9 javaEnabled (&je) 1 analytics_debug.js:9 language (&ul) en-us analytics_debug.js:9 location (&dl) http://www.99-dot-com-website-testing.com/orderstatus.php?id=5545 analytics_debug.js:9 screenColors (&sd) 24-bit analytics_debug.js:9 screenResolution (&sr) 1366x768 analytics_debug.js:9 title (&dt) 99TShirts analytics_debug.js:9 trackingId (&tid) UA-49506235-1 analytics_debug.js:9 viewportSize (&vp) 1366x412
Mar 29, 2014
i got this message
Apr 2, 2014
Still happening. Analytics stores the 'transactions' (Conversions->Ecommerce->Transactions) but not the 'addItem'(There is no product tracked). You can experience the error (with the analytics debugger plugin installed) 'Set called on unknown field: "items". ' and you can see your items are not well defined: <unknown> (&ic) T124C analytics_debug.js:9 <-- Should be 'Item Category' <unknown> (&in) 2 Medium 4 Toppings + Cokes analytics_debug.js:9 <-- Should be 'Item Name' <unknown> (&ip) 17.99 analytics_debug.js:9 <-- Should be 'Item Price' <unknown> (&iq) 1 analytics_debug.js:9 <-- Should be 'Item quantity' adSenseId (&a) 2041674749 analytics_debug.js:9 apiVersion (&v) 1 analytics_debug.js:9 clientId (&cid) 776535948.1395091488 analytics_debug.js:9 ec:id (&ti) 177726564 analytics_debug.js:9 encoding (&de) UTF-8
Apr 2, 2014
I'm getting the same error using the code that google provided on their developer toolset. Looking forward to seeing some solutions. <unknown> (&ic) DD44 analytics_debug.js:9 <unknown> (&in) T-Shirt analytics_debug.js:9 <unknown> (&ip) 11.99 analytics_debug.js:9 <unknown> (&iq) 1 analytics_debug.js:9 <unknown> (&iv) Apparel analytics_debug.js:9 adSenseId (&a) 1503818314 analytics_debug.js:9 apiVersion (&v) 1 analytics_debug.js:9 clientId (&cid) 1062405109.1395859112 analytics_debug.js:9 ec:id (&ti) 1234 analytics_debug.js:9 encoding (&de) ISO-8859-1 analytics_debug.js:9 flashVersion (&fl) 12.0 r0 analytics_debug.js:9 hitType (&t) item analytics_debug.js:9 javaEnabled (&je) 1 analytics_debug.js:9 language (&ul) en-us analytics_debug.js:9 location (&dl) https://secure3.convio.net/bfre/site/Donation2?idb=1004832383&df_id=1700&1700.donation=completed&idb=1004832383 analytics_debug.js:9 screenColors (&sd) 24-bit analytics_debug.js:9 screenResolution (&sr) 1920x1200 analytics_debug.js:9 title (&dt) Beaconfire Consulting analytics_debug.js:9 trackingId (&tid) UA-3217754-13 analytics_debug.js:9 viewportSize (&vp) 1905x1060
Apr 14, 2014
4/12 - Experiencing same issue with the google analytics. 'Set caleld on unknown field: "items".' Has anyone found a fix for this yet or are we still waiting for google to implement a fix?
Apr 14, 2014
In my case, I figured out that's the issue is "associated" to your GA account. Contacted GA Support, after a few weeks of doing and undoing what they just did, the guy that apparently was in charge of this left Google. So we end-up reverting to old GA code.
Apr 14, 2014
RE: #30 I'm using the same ID for both and still have the issue. Could the actual fix be that you're using a string instead of an int?
Apr 14, 2014
I'm using the same string id but it does not work ...
Apr 14, 2014
Deleted previous comment, double checked file after (even though it's working for me now) and I thought the error was gone (Set called on unknown field: "items".) but it's still there, just now at the top of all the calls. Very weird. Sorry guys!
May 28, 2014
Hi i am getting the same error, is there a fix for this issue? Set called on unknown field: "id". analytics_debug.js:9 Set called on unknown field: "affliation". analytics_debug.js:9 Set called on unknown field: "revenue". analytics_debug.js:9 Set called on unknown field: "shipping". analytics_debug.js:9 Set called on unknown field: "tax". can some please help me on this?
Oct 10, 2014
(No comment was entered for this change.)
Labels:
-Component-CoreReportingAPI Component-TrackingCode
Jul 21, 2015
-Component-CoreReportingAPI Component-TrackingCode
Jul 22, 2015
What's update on this? Still waiting for this to get fixed. |
|
| ► Sign in to add a comment |