Community Support Forums — WordPress® ( Users Helping Users ) — 2011-05-24T19:30:19-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=6506 2011-05-24T19:30:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6506&p=15798#p15798 <![CDATA[Re: Signup tracking; product info never shows in Google Anal]]> Thanks for reporting back on this.
It's much appreciated.

Certainly, I'll see what we can do about that in a future release.

Statistics: Posted by Jason Caldwell — May 24th, 2011, 7:30 pm


]]>
2011-05-24T12:53:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6506&p=15781#p15781 <![CDATA[Re: Signup tracking; product info never shows in Google Anal]]>
The quote bit is a good point, though. Might be a good idea to throw in a quick warning about that.

Statistics: Posted by sugeneris — May 24th, 2011, 12:53 pm


]]>
2011-05-23T18:36:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6506&p=15704#p15704 <![CDATA[Re: Signup tracking; product info never shows in Google Anal]]> What is the exact value of this Replacement Code?
%%item_name%%

Does it contain any single-quotes? If so, that could cause it to fail in this context, because the value is wrapped with single-quotes as well. In other words, this would cause it to fail.

Code:
  _gaq.push(['_addItem',
    '%%subscr_id%%',           // order ID - required
    '%%item_number%%',           // SKU/code - required
    'Jason's Item',        // product name ( FAIL )
    '',   // category or variation
    '%%initial%%',          // unit price - required
    '1'               // quantity - required
  ]);

Statistics: Posted by Jason Caldwell — May 23rd, 2011, 6:36 pm


]]>
2011-05-23T18:24:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6506&p=15703#p15703 <![CDATA[Re: Signup tracking; product info never shows in Google Anal]]> Statistics: Posted by Jason Caldwell — May 23rd, 2011, 6:24 pm


]]>
2011-05-20T06:34:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=6506&p=15493#p15493 <![CDATA[Signup tracking; product info never shows in Google Analytic]]>
Over in Analytics, under the Ecommerce section, the Transactions view seems to be working fine, which as far as I can tell comes from the _addTrans portion of the code. The "quantity" column always shows 0, but we'll come to that in the next bit as that's not an _addTrans value.

The Product Performance area, though, shows absolutely no data. This is the stuff that should be coming from the _addItem chunk. Note that the quantity is hard-coded as "1" and that we already know the %%subscr_id%% variable works from the Transaction info. So, even if not all the information is getting through, at the very least the transactions should be showing a quantify of 1.

Based on that, I have to assume that the entire _addItem block is failing, but I can't see why. Has anyone else gotten this to work, and could you share your code? I'm using s2Member Pro 3.5.8 on WP 3.1.2


Code:
<script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXXXX-1']);
    _gaq.push(['_setDomainName', '.example.com']);
    _gaq.push(['_trackPageview']);

    _gaq.push(['_addTrans',
       '%%subscr_id%%',           // order ID - required
       'Client Site Name', // affiliation or store name
       '%%initial%%',          // total - required
       '',           // tax
       '',              // shipping
       '',       // city
       '',     // state or province
       ''             // country
    ]);
   // add item might be called for every item in the shopping cart
  _gaq.push(['_addItem',
    '%%subscr_id%%',           // order ID - required
    '%%item_number%%',           // SKU/code - required
    '%%item_name%%',        // product name
    '',   // category or variation
    '%%initial%%',          // unit price - required
    '1'               // quantity - required
  ]);

  _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers


    (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>

Statistics: Posted by sugeneris — May 20th, 2011, 6:34 am


]]>