CyberStore Documentation
Google Analytics Integration
User's Guide > Integrations > Google Analytics Integration
In This Topic

Google Analytics tracking can be used with your CyberStore site in order to provied valuable marketing intelligence about the site and your visitors journeys through it.

For more information about Google Analytics, pre-requisistes to begin using the service visit https://analytics.google.com/analytics/web.

Setting up Google Analytics in CyberStore

Integration is setup  in the Site Scripts tab of the Site Manager > Site Configuration screen.

The "Google Site Tracker ID" is the unique Site Tracker ID provided to you after you set up a Google Analytics Account for your Site. Once you save this value, Google Analytics will begin to receive your page view data.

The "Send orders to Google Ecommerce" option when checked, allows CyberStore to send order transaction and Item information to Google Ecommerce if your Google Analytics configuration can accept e-commerce data.

Copy Code
Copy Code

Universal Analytics Scripts

Page Tracking Script

Universal Analytics (UA) Integration for Google Analytics, page tracking scripts are implemented on every CyberStore page and code will be found within each page's section.

UA Page Tracking Script Tag
Copy Code
        
<script type="text/javascript">
//
// sample ga implementation of a Google Analytics tracking using UA (Universal Analytics)
//               
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
    ga('create', 'UA-XXXXXXXXXX', 'auto');
    ga('send', 'pageview');
</script>

Google Ecommerce Event Tracking Script

When the Universal Analytics (UA) option is set and the "Send orders to Google Ecommerce" option is checked, the Google Ecommerce script code for UA be included on an order receipt page based.

The scripts shown are implemented on the Checkout receipt page and code will be found within the page's section.

UA Sample Ecommerce Script Tag
Copy Code
<script type="text/javascript">
//
// sample ga implementation of a Google Ecommerce transaction event using UA (Universal Analytics)
//               
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
    'id': '7019',                    
    'affiliation': 'alpha.atkinson.corp.dovetailinternet.com',  
    'revenue': '445.85',              
    'shipping': '69.65',                 
    'tax': '34.20'                    
});   
ga('ecommerce:addItem', {
    'id': '7019',                  
    'name': '15 Speed Mountain Bike Girls',   
    'sku': 'A101',               
    'category': '',        
    'price': '380.00',                
    'quantity': '1'                 
});   
ga('ecommerce:send');
</script>

 

See Also

Site Manager