How do I install Matomo tracking code on Github Hosted Pages?
You may have a scenario where you want to evaluate the full user-experience of your visitor’s behaviour in Github hosted websites. You can achieve this with Matomo. Follow the steps below:
- Login to Matomo as an Administrator
- Create a New Website
- To get the Matomo JavaScript Tracking code:
a. Click on “Administration” (cog icon) on the top right of your dashboard
b. Click on “Websites > Tracking Code”
c. Choose the website from the dropdown
d. Configure the options as desired
e. Copy the JavaScript Tracking Code - Proceed to your GitHub repository of your GitHub pages hosted website
- Edit the HTML pages you want to track in Matomo
- Paste the tracking code in the HTML files before the end of
</head>
tag - Save the edited files