grazies / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 1 forks source link

Set called on unknown field: "items" #376

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
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.

Original issue reported on code.google.com by arpit.g...@joshlabs.in on 2 Dec 2013 at 6:11

GoogleCodeExporter commented 8 years ago
same story with me

Original comment by robertpo...@gmail.com on 14 Jan 2014 at 3:34

GoogleCodeExporter commented 8 years ago
likewise here - if we remove custom variable name/val pair from the beacon the 
data is tracked as expected. 

Original comment by p...@pheekaboo.io on 5 Feb 2014 at 3:36

GoogleCodeExporter commented 8 years ago
same here

Original comment by ltick...@gmail.com on 6 Feb 2014 at 11:30

GoogleCodeExporter commented 8 years ago
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 

Original comment by gary.bha...@hjcnewmedia.com on 13 Feb 2014 at 8:37

GoogleCodeExporter commented 8 years ago
I am also getting the same error. Does anyone find the solution for this issue ?

Original comment by gauravku...@gmail.com on 19 Feb 2014 at 10:24

GoogleCodeExporter commented 8 years ago
same here

Original comment by greg.b...@gmail.com on 19 Feb 2014 at 9:17

GoogleCodeExporter commented 8 years ago
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?

Original comment by ivan.sva...@hi-tech.hr on 20 Feb 2014 at 3:42

GoogleCodeExporter commented 8 years ago
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.

Original comment by greg.b...@gmail.com on 21 Feb 2014 at 3:28

GoogleCodeExporter commented 8 years ago
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!

Original comment by greg.b...@gmail.com on 21 Feb 2014 at 4:17

GoogleCodeExporter commented 8 years ago
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 ??

Original comment by gary.bha...@hjcnewmedia.com on 21 Feb 2014 at 4:46

GoogleCodeExporter commented 8 years ago
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;

Original comment by greg.b...@gmail.com on 21 Feb 2014 at 5:19

GoogleCodeExporter commented 8 years ago
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"

Original comment by b...@heptec.com on 26 Feb 2014 at 10:21

GoogleCodeExporter commented 8 years ago
+1 for me the items fields are all showing up as <unknown>, except for ec:id.

Original comment by blow...@googlemail.com on 4 Mar 2014 at 4:41

GoogleCodeExporter commented 8 years ago
Related
https://productforums.google.com/forum/#!topic/analytics/3iBlnhNZT4A

Original comment by blow...@googlemail.com on 4 Mar 2014 at 4:50

GoogleCodeExporter commented 8 years ago
Ive just confirmed, this issue occurs even when using the examples found on the 
developer guidelines

https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommer
ce

Original comment by blow...@googlemail.com on 4 Mar 2014 at 5:06

GoogleCodeExporter commented 8 years ago
I can confirm this. Both with my own code and the sample code from dev 
guidelines.

Original comment by matthias...@fusonic.net on 5 Mar 2014 at 4:15

GoogleCodeExporter commented 8 years ago
I too like to confirm this.

Tested with and without GTM using own and sample code from the guidelines.

Original comment by marc.ego...@gmail.com on 12 Mar 2014 at 12:35

GoogleCodeExporter commented 8 years ago
I also would like to confirm this

Original comment by himanshu...@vgw.co on 12 Mar 2014 at 1:29

GoogleCodeExporter commented 8 years ago
+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". 

Original comment by gerber.greg on 21 Mar 2014 at 1:46

GoogleCodeExporter commented 8 years ago
We experience the same issues, very annoying.

Original comment by webmas...@massiveart.com on 21 Mar 2014 at 1:07

GoogleCodeExporter commented 8 years ago
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...!!

Original comment by fatehstu...@gmail.com on 21 Mar 2014 at 6:01

GoogleCodeExporter commented 8 years ago

Original comment by pfrise...@google.com on 24 Mar 2014 at 11:17

GoogleCodeExporter commented 8 years ago
Tried to create new account couple of times with no luck. How is this medium 
priority when ecommerce is not working for some users?

Original comment by aurelijus.rozenas@gmail.com on 26 Mar 2014 at 7:01

GoogleCodeExporter commented 8 years ago
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=161
7463431.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-websi
te-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-test
ing.com%2Forderstatus.php%3Fid%3D5545&ul=en-us&d…90111&ic=Couple%20Tshirt&iv=C
ouple%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 

Original comment by arulkuma...@gmail.com on 29 Mar 2014 at 7:23

GoogleCodeExporter commented 8 years ago
i got this message

Original comment by arulkuma...@gmail.com on 29 Mar 2014 at 7:24

GoogleCodeExporter commented 8 years ago
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 

Original comment by ab...@plasticmobile.com on 2 Apr 2014 at 4:56

GoogleCodeExporter commented 8 years ago
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.do
nation=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 

Original comment by jenbol...@gmail.com on 2 Apr 2014 at 5:58

GoogleCodeExporter commented 8 years ago
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?

Original comment by btass...@sharptop.co on 14 Apr 2014 at 6:59

GoogleCodeExporter commented 8 years ago
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.

Original comment by nicolas....@gmail.com on 14 Apr 2014 at 7:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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?

Original comment by gerber.greg on 14 Apr 2014 at 8:27

GoogleCodeExporter commented 8 years ago
I'm using the same string id but it does not work ...

Original comment by matthias...@fusonic.net on 15 Apr 2014 at 4:53

GoogleCodeExporter commented 8 years ago
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!

Original comment by btass...@sharptop.co on 15 Apr 2014 at 6:42

GoogleCodeExporter commented 8 years ago
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?

Original comment by coolsmar...@gmail.com on 28 May 2014 at 11:15

GoogleCodeExporter commented 8 years ago

Original comment by pfrise...@google.com on 10 Oct 2014 at 5:43

GoogleCodeExporter commented 8 years ago
-Component-CoreReportingAPI Component-TrackingCode 

Original comment by jejeocam...@gmail.com on 22 Jul 2015 at 6:41

GoogleCodeExporter commented 8 years ago
What's update on this? Still waiting for this to get fixed.

Original comment by arpit.g...@joshtechnologygroup.com on 22 Jul 2015 at 7:05