jquery - unable to get property of 'sku' undefined or null reference -
i have following jquery code in google tag manager
for(item in cartobject){ ga(ec:addproduct,{"id":cartobject[item][sku],"name":cartobject[item][name],"category":cartobject[item][categories],"brand":cartobject[item][_0xad1e[5]],"price":cartobject[item][_0xad1e[16]],"quantity":cartobject[item][_0xad1e[30]]})}; ga(_0xad1e[6],_0xad1e[38],{"step":_0xc357x7}); ga(_0xad1e[8],_0xad1e[9],_0xad1e[10],_0xad1e[11],_0xad1e[39]+_0xc357x7,{"noninteraction":1}); }
that suppose variables success.html page of website
orderobject['0'] = { 'sku': '161', 'name': 'trappist ale discovery (12 bottles) plus free chalice glass', 'price': '38.5', 'qty': '1.0000', 'categories':'discovery cases,belgian beers,browse our beers,browse style,browse mixed cases,abbey , trappist', 'brand':'' } var transactionobject = {}; transactionobject = { 'tid': '100029250', 'aid': 'beer hawk', 'revenue': '6.9900', 'tax': '7.5800', 'shipping': '6.9900', 'ccode': '' }
it works in browsers apart internet explorer gives following message in console
unable property of 'sku' undefined or null reference
my code start following
<script> jquery(document)[ready] (function() {
i have looked @ changing bits of code nothing seems work in internet explorer, need variables send them google analytics
in piece (and others)
cartobject[item][sku]
item variable sku not - should string
try
cartobject[item]["sku"]
or
cartobject[item].sku
etc
Comments
Post a Comment