-
Notifications
You must be signed in to change notification settings - Fork 0
Implementation on my site
ComputerElite edited this page Mar 6, 2022
·
3 revisions
This will explain how I implemented ComputerAnalytics on my site:
- Any Linux, Windows or MacOS Computer (I use a raspberry pi)
- An website
- (optional but recommended) an domain
I deployed ComputerAnalytics on a raspberry pi which runs Ubuntu with the Dotnet runtime. Then I went through the setup (desribed in the home page).
Code: https://github.com/ComputerElite/ComputerElite.github.io/blob/cbd6383245840ddea3aa35aacedb392c1f0bbdd4/js/standard.js#L146 Lines: 146 - 148
var script = document.createElement("script") // Create a script element
script.src = "https://analytics.rui2015.me/analytics.js?origin=" + location.origin // Add the ComputerAnalytics server as source with the query parameter origin set to the origin (in this case: 'https://computerelite.github.io')
document.head.appendChild(script) // Add the script to the head so it loads even after the page has loaded
I simply put in my private token to view the analytics on https://analytics.rui2015.me/
and can then view everything