How do I configure Google Analytics?

To add the tracking code to your Registration Site, you will first need to login via the FTP and access the “Main.Master” page. This page is used as a layout for every page that is rendered in our site. You can easily add the code snippet that you get from Google Analytics configuration to the very bottom of the “head” section.

Quick Tip – If you need access to the FTP, contact Support and we can get you setup.

Script

The default configuration contains a line called “ga(‘send’, ‘pageview’);” This will register every single pageview to google analytics. Some of our wizards load the same page for multiple steps (the main example is the Checkout Wizard). You can also edit Content Fields on many of the pages and add code to the content field that will be rendered on the select pages like follows:


<script>

 if (ga) {

     ga('send', 'pageview', '/Registration/CheckoutComplete.aspx');

}

</script>

The previous script will register a specific page view (even though this page doesn’t actually exist). By doing this you can track the conversion funnel better.

Funnel

Here is an example funnel:

  • Event Selection URL: /Registration/EventSelection.aspx
  • Add PageView:  ga(‘send’, ‘pageview’, ‘/Registration/EventSelection.aspx’);
  • Cart URL: /Registration/ManageRegistrations.aspx
  • Add PageView: ga(‘send’, ‘pageview’, ‘/Registration/ManageRegistrations.aspx’);
  • Checkout URL:  /Registration/RegistrationWizard.aspx
    • All of the checkout wizard are the same url. The content fields change from step to step though.
  • Conditions
    • Add PageView: ga(‘send’, ‘pageview’, ‘/Registration/CheckoutTerms.aspx’);
  • Payment Info
    • Add PageView: ga(‘send’, ‘pageview’, ‘/Registration/CheckoutPayment.aspx’);
  • Review Selections
    • Add PageView: ga(‘send’, ‘pageview’, ‘/Registration/CheckoutReview.aspx’);
  • Complete
    • Add PageView: ga(‘send’, ‘pageview’, ‘/Registration/CheckoutComplete.aspx’);

Edit Content Fields

Here is an article that walks you through the steps to update Content Fields:

Once you Show Content Fields you can see what pages can be edited throughout the site by the dashed border and the pencil icon beside the content.

There is a “View source” button that will allow you to edit the html of any content field. When you view the HTML, just put the custom JavaScript in there and click update.

  • Preview – Will allow you and anyone else that is logged into site admin to see the changes; these will not be shown to all visitors. These are displayed with a red dashed border instead of black.
  • Commit – Will allow all visitors of the site to see the content
  • Undo – Will revert the content back to the last published content.
  • Cancel – Closes the dialog
  • Revert to Default – This will revert the content to our default and is not recommended. It will completely erase all content and revert it back to our value.

eCommerce Conversion

Once you go through initial setup and understand conversion funnels, now is the actual ecommerce conversion part.

To actually implement this you will need to create an Account and actually register someone to get the Content Field value in place. There is currently not a way to have to set Content Fields values without actually viewing the page.

There will be one or more GAaddTransaction divs followed by one or more GAaddItem divs.

Quick Tip – It is uncommon that there are multiple GAaddTransaction divs. It is, however, very common for there to be multiple GAaddItem divs. The only way there would be multiple GAaddTransaction divs is if no payment is made because existing credit was applied or a 100% discount was applied and the user is registering multiple individuals at the same time.
Hidden Fields

Here is the simple layout for the hidden fields:


<div class="GAaddTransaction">

<input type="hidden" name="id" value="1234" />

<input type="hidden" name="affiliation" value="{{Company Name}}" />

<input type="hidden" name="revenue" value="1000" />

<input type="hidden" name="shipping" value="0" />

<input type="hidden" name="tax" value="0" />

     <div class="GAaddItem">

          <input type="hidden" name="id" value="1234" />

          <input type="hidden" name="name" value="{{Event Division Name}}" />

      <input type="hidden" name="sku" value="{{Event Division ID}}" />

          <input type="hidden" name="category" value="{{Event Division type}}" />

          <input type="hidden" name="price" value="1000" />

      <input type="hidden" name="quantity" value="1" />

</div>

</div>

The most complex version would be:


<div class="GAaddTransaction">

<input type="hidden" name="id" value="1234" />

<input type="hidden" name="affiliation" value="{{Company Name}}" />

<input type="hidden" name="revenue" value="2000" />

<input type="hidden" name="shipping" value="0" />

<input type="hidden" name="tax" value="0" />

     <div class="GAaddItem">

          <input type="hidden" name="id" value="1234" />

          <input type="hidden" name="name" value="{{Event Division Name}}" />

   <input type="hidden" name="sku" value="{{Event Division ID}}" />

          <input type="hidden" name="category" value="{{Event Division type}}" />

          <input type="hidden" name="price" value="1000" />

   <input type="hidden" name="quantity" value="1" />

          </div>

          <div class="GAaddItem">

           <input type="hidden" name="id" value="1234" />

           <input type="hidden" name="name" value="{{Event Division Name}}" />

   <input type="hidden" name="sku" value="{{Event Division ID}}" />

          <input type="hidden" name="category" value="{{Event Division type}}" />

          <input type="hidden" name="price" value="1000" />

   <input type="hidden" name="quantity" value="1" />

       </div>

</div>

<div class="GAaddTransaction">

   <input type="hidden" name="id" value="1234" />

   <input type="hidden" name="affiliation" value="{{Company Name}}" />

   <input type="hidden" name="revenue" value="2000" />

   <input type="hidden" name="shipping" value="0" />

   <input type="hidden" name="tax" value="0" />

          <div class="GAaddItem">

            <input type="hidden" name="id" value="1234" />

            <input type="hidden" name="name" value="{{Event Division Name}}" />

            <input type="hidden" name="sku" value="{{Event Division ID}}" />

        <input type="hidden" name="category" value="{{Event Division type}}" />

            <input type="hidden" name="price" value="1000" />

            <input type="hidden" name="quantity" value="1" />

      </div>

      <div class="GAaddItem">

          <input type="hidden" name="id" value="1234" />

          <input type="hidden" name="name" value="{{Event Division Name}}" />

    <input type="hidden" name="sku" value="{{Event Division ID}}" />

          <input type="hidden" name="category" value="{{Event Division type}}" />

          <input type="hidden" name="price" value="1000" />

   <input type="hidden" name="quantity" value="1" />

          </div>

</div>

Mapping

Transaction
  • Id – Either the payment transaction ID associated with their payment or NO_PAYMENT_REG_{0} where {0} is the registration id.
  • Affiliation – The company name, ie: CircuiTree.
  • Revenue – The total of all tuition for the registrations processed (not the deposit the person paid).
  • Shipping – 0 //Hard coded.
  • Tax – 0 //Hard coded.
Item
  • Id – Same as the parent id.
  • Name – The event division name for registrations and the resource name for reservations.
  • SKU – Event division ID for registrations and the resource ID for reservations.
  • Category – Event Division Type name for registrations and resource category name for reservations.
  • Price – Price of registration or reservation.
  • Quantity – number of attendees on this registration or quantity of resources reserved for reservations.

eCommerce Conversion Code

Finally, here is the code for the ecommerce conversion:


<script>

if (ga) {

     ga('require', 'ecommerce');


     var cont = $(".GAaddTransaction");

 

     cont.each(function(i, transaction){

     ga('ecommerce:addTransaction', {

          'id': $("[name=id]", transaction).val(),                              // Transaction ID. Required.

          'affiliation': $("[name=affiliation]", transaction).val(),            // Affiliation or store name.

          'revenue': $("[name=revenue]", transaction).val(),                    // Grand Total.

          'shipping': $("[name=shipping]", transaction).val(),              // Shipping.

          'tax': $("[name=tax]", transaction).val()                         // Tax.

     });

     $(".GAaddItem", transaction).each(function(i, e){

          ga('ecommerce:addItem', {

          'id': $("[name=id]", e).val(),                              // Transaction ID. Required.

          'name': $("[name=name]", e).val(),                         // Product name. Required.

          'sku': $("[name=sku]", e).val(),                            // SKU/code.

          'category': $("[name=category]", e).val(),                  // Category or variation.

          'price': $("[name=price]", e).val(),                   // Unit price.

          'quantity': $("[name=quantity]", e).val()              // Quantity.

     });

});

     ga('ecommerce:send');

});

}

</script>