Post on: Jan 4, 2023Last edited: Jan 26, 2025Words 240Read Time 1 min

type
status
date
slug
summary
tags
category
icon
password
comment
Google Analytics is a valuable tool for tracking the traffic and user behavior on your website. If you have a Jekyll website, you can easily add Google Analytics tracking by following these steps:
  1. Sign up for a Google Analytics account and create a new property for your website. You will be given a tracking code, which you will need to add to your Jekyll website.
  1. In your Jekyll website, create a new file in the _includes directory called g-analytics.html. This file will contain the tracking code that you will include in your website.
  1. In the g-analytics.html file, paste the tracking code that you received from Google Analytics. The tracking code should look something like this:
  1. Replace GA_TRACKING_ID with your actual tracking ID, which can be found in your Google Analytics account.
  1. In your Jekyll website, open the html file that creates the head section of your website.
  1. Paste the following code.
{% include g-analytics.htl %}
This will insert the tracking code from the g-analytics.html file into all of your pages.
  1. Save the changes and push the changes to your website.
  1. That’s it! You have successfully added Google Analytics tracking to your Jekyll website. It may take a few hours for the tracking to start appearing in your Google Analytics account.
I hope this helps! Let me know if you have any questions.

Loading...
An app a company keeps the customers frustrated.

An app a company keeps the customers frustrated.


The Future of Blogging is Headless Content Management Systems

The Future of Blogging is Headless Content Management Systems