How to insert Google Analytics to your Jekyll blog in Shopify

One of the outstanding products of Google is Google Analytics Solutions which allows the users or sellers to track and report about website traffic. With this amazing tool, the Shopify store owners can discover who coming to their website, what they are watching to, how they are using their website. Based on the patterns of the buyers, the online sellers can choose the content which can be the most popular or based on the location, shipping method or even an order to create competitive advantages.

Google Analytics which provides those information are so helpful for the online sellers to make decisions how is the best to deliver content. If you want to set up a website, it is necessary to install Jekyll and to create a new Google Analytics account. Jekyll gives the users a lot of flexibility to customize the site contribution. There are some options such as _config.yml or _config.toml files which are placed in the root directory. With Jekyll, everything is done easily.

Getting Google Analytics is easy if you start with Google account. It is possible for the Shopify store owners to make the changes and give the customers better shopping experiences so the web builders could also improve traffic and marketing efficiency. The Shopify sellers can have more sales from the precious data of visitors coming to the website.

For the web builders want to run Jekyll on a site, they should start with the site’s directory in the command line, and then choose to run one of these commands. Or the Shopify store owners can consider this guiding article How to insert Google Analytics to your Jekyll blog in Shopify to have the besst instruction to add the Google Analytics to their Jekyll as well as their stores.

How to insert Google Analytics to your Jekyll blog in Shopify

Step 1: Create an Analytics account

Firstly, creating the new Analytics account is compulsory. If you have not created account yet, you can create one by signing up in the Google Analytics website.

Step 2: Build a property

In the Shopify store site, the users enables setting up a property to start adding Google Analytics to their Jekyll blog.

Step 3: Set the Google analytics

By copying the Tracking Id, in _config.yml file, the Shopify store owners can set this as a google_analytics_key variable:

...
google_analytics_key: UA-16478174-16
...

Step 4: Add the tracking code

Because this snippet is typical for the production environment, the users will only be able to add the the tracking code for this step. It is easy for the website builders to set up their expected in the main layout by pasting this code ` _layouts/default.html`, then paste it in the heading:

  <script>
    (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-37472773-1", "auto");
    ga("send", "pageview");
  </script>

Conclusion

Google Analytics Solutions is extremely popular and helpgul for the Shopify store owners to increase the website traffic as well as the sales. With this effective guidance How to insert Google Analytics to your Jekyll blog in Shopify, the Shopify online sellers can have understand more about Jekyll as well as Google Analytics. Another blog that the online sellers can discover more about building content with Jekyll such as How to build Jekyll on your site, How to set up Jekyll on Mac OS X, How to set up Jekyll on Linux or How to set up Jekyll on Windows.