Part1: Custom Head snippets with Jekyll on theme

In the web basics, we learned to add UA properties of google analytics, but since it will end soon, we need to use GA4 properties. Also, we might want to use Microsoft clarity and Yandex metrica, but they all require to but a code in the head-/head section. What shall we do if we want to add those? Easy enough, all you need is a folder and a file!

Using the Includes folder

Checking the structure of the Cayman theme, which is I use, the best way is to create an _includes folder! You can create it manually on all operating systems.

image1

Custom head file

After creating the _includes folder, enter the directory and add a file called head-custom.html.

image2

Custom head snippets

Edit the custom-head.html with any editor you want, you can even edit it with notepad! Paste all the codes for Google Analytica and Clarity and Metrica etc. !

Then, add, commit, and push to update the remote repository!

**Now, open your website, and open the developer mode, or inspect, you should be able to see the customed head snippets!

image3

Comment here

back