Closed gerbrent closed 2 years ago
This is simple enough to do if you still want it. We already have a plausible instance running it would just be a case of injecting the tracking code into the hugo site headers.
<script defer data-domain="new.jupiterbroadcasting.com" src="https://plausible.ktz.cloud/js/plausible.js"></script>
I have a demo instance set up we can use for testing. Above is the code to be injected into <head>
.
@elreydetoda - can you help Alex implement the into Hugo-speak?
No problem, I can get this implemented after work (17:00 EST).
Alright, I think that PR should work. I made it a bit more dynamic so we could potentially use it for other sites (i.e. jb-live (once we merge the footer/menu into that theme), if we have a dev.jb.com, etc.). So, that's why I'm saying it should work :upside_down_face:
If not we can just pass in the data-domain via the params.toml like how I did for the url.
Also, @ironicbadger is there anyway you could rename the plausible file to something else, because by default the way I getting the file it's keeping the plausible name in the filename. I'm pretty sure I've seen regex before (IIRC in uBlock origin) just based on the word plausible. So, if you change it to something that uBlock doesn't key off of then you'll probably get more analytics data.
This is plausible's recommendation: https://plausible.io/docs/proxy/introduction#are-you-concerned-about-missing-data
Confirmed working! 🥳
Plausible: Open source Google Analytics alternative | Plausible Analytics
First Question: Do we even want/need analytics?