Menu Close

How to add Google Analytics to Shopify

  1. Knowledge Base
  2. Shopify

How to enable Universal Google Analytics :

  • Sign in to your Google Analytics account
  • Click on Analytics in the drop-down menu
  • Select Website on the next page and fill in the form.
  • Under Website URL, enter your Primary domain
  • Click on Get Tracking ID
  • You will now see a tracking ID code snippet provided by Google :

(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’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-########-#’, ‘yourwebsite.com’);
ga(‘send’, ‘pageview’);

  • Copy the code. Go to your Shopify admin panel.
  • Click on Online Store – Preferences

Paste the code copied in the Google Analytics field
 
 

Smiley face




Leave a Reply

Your email address will not be published. Required fields are marked *