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.
Integration is setup in the Itegrations 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.
The Version option lets you choose the version of Google Analytics used for the site.
With the release of Tag Manager (GA4) Integration in version 2023.1.9 for Google Analytics 4, page tracking scripts are implemented on every CyberStore page and code will be found within each page's section.
GA4 Example Page Tracking Script Tag |
Copy Code
|
---|---|
<script type="text/javascript"> // // sample gtag implementation of a Google Analytics tracking using GA4 // window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-XXXXXXXXXX'); </script> |
When the Tag Manager (GA4) option is set and the "Send orders to Google Ecommerce" option is checked, the Google Ecommerce script code for GA4 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.
GA4 Sample Ecommerce Script Tag |
Copy Code
|
---|---|
<script type="text/javascript"> // // sample gtag implementation of a Google Ecommerce transaction event using GA4 // gtag('event', 'purchase', { "currency":"USD", "transaction_id":"7018", "value":445.85, "affiliation":"www.theoutdoorscompany.com", "shipping":69.65,"tax":34.20, "items":[{ "item_id":"A101", "item_name":"15 Speed Mountain Bike Girls", "item_category":"", "item_category2":"", "price":380.00, "quantity":1 }] }); </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> |
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> |