0 Replies Latest reply: Jul 16, 2014 1:41 AM by Asad 6SM RSS

    Tracking Webapp Transactions

    Asad 6SM Community Member

      Hi All,

       

      We developed an events webapp which is linked to our events module following a BC Gurus tutorial. We have found this to be great as it offers the user a lot more flexibility.

      I am struggling to figure out how to track any transactions that are in the webapp section using Google Analytics. If someone books into an event and pays for it it doesn't seem to go to the same page as when someone processes a transaction.


      I am using the following code to track my transactions. I believe the {tag_amount} and {tag_orderid} are completely unique to the product transactions and not to the webapp transactions.

      <script>

        ga('require', 'ecommerce', 'ecommerce.js');

        var transactionAmount = '{tag_amount}';

        var cleanTransactionAmount = transactionAmount.split(',').join('');

        ga('ecommerce:addTransaction', {

        'id': '{tag_orderid}',

        'affiliation': '',

        'revenue': cleanTransactionAmount,

        'shipping': '',

        'tax': ''

        });

        ga('ecommerce:send');

      </script>


      Can anybody help on the following two questions...

      1. What do I need to change in the code above to track webapp transactions?
      2. Where does it go?

       

      Many thanks to you all.

       

      Asad