I’m triyng to push multiple items into the _gaq.push() for google analytics.
I have an array of Ids that im looping through to create the array to pass to .push();
var gaDetails = new Array();
var productIdsArray = productIds.split(",");
for(var i = 0; i < productIdsArray.length; ++i)
gaDetails.push(['_trackEvent', 'Quote', '' + step, '' + productIdsArray[i]]);
_gaq.push(gaDetails);
It looks like theres an extra set of [] around each array. Maybe I’m not seeing something but the way google describes their syntax looks wrong?
you don’t need the other array, and while you’re at it you might as well use a faster loop.