MDS
MDS

Reputation: 507

Google Ecommerce tracking data not showing up

No google ecommerce data is showing up in analytics. I have have the docs, used the ga_debug.js plugin for Chrome, no errors are thrown. Poured over my code to find an error, but don't see any. Anyone see any errors in my snippet here?

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
  _gaq.push(['_trackPageview']);






    _gaq.push(['_addTrans',
    513,
    Storename,
    99.95,
    0,
    3.95,
    Matthews,
    NC,
    US
    ]);

_gaq.push(['_addItem',
    513,
    6,
    The Driver's License Pet Tag,
    none,
    19.99,
    1
    ]);

_gaq.push(['_addItem',
    513,
    7,
    Pet Driver's License Bag Tag,
    none,
    19.99,
    2
    ]);

_gaq.push(['_addItem',
    513,
    5,
    Pet Driver's License Key Chain,
    none,
    19.99,
    2
    ]);
_gaq.push(['_trackTrans']);
// load Analytics
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +     '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

If anyone has any insights into this, please help. I don't see any reason why this should be happening.

Upvotes: 0

Views: 258

Answers (1)

CrayonViolent
CrayonViolent

Reputation: 32537

Did you look at the documentation for e-commerce tracking?

You need to surround your values in quotes. This is actually basic javascript syntax, not GA specific syntax.

Example (you need to do it for all of your values in all of your .push() calls):

_gaq.push(['_addTrans',
    "513",
    "Storename",
    "99.95",
    "0",
    "3.95",
    "Matthews",
    "NC",
    "US"
    ]);

Upvotes: 1

Related Questions