jthingelstad / foreground

A MediaWiki skin that focuses on putting your content in the foreground.
http://foreground.wikiproject.net/
Other
137 stars 60 forks source link

Question: Inserting new GA4 analytics code snippet correctly #399

Open rebastion opened 2 years ago

rebastion commented 2 years ago

Google is transitioning to a newer tag based analytics system called GA4, and they write to insert the code snipped within the head-section. Now, in this skin, the foreground skin php file doesn't really offer much in the way of just pasting things that go there, how do I go about inserting the code correctly, is the head stuff hidden in some other source file? Thanks!

samwilson commented 2 years ago

There are a few extensions that say they do that, e.g. https://www.mediawiki.org/wiki/Extension:GTag (although I don't know of it works for GA4; perhaps not). Fixing one of them to work correctly would be a neater way to solve this, I think, rather than hacking the skin.

rebastion commented 2 years ago

Yeah, that extension hasn't been updated in two years, I wonder if it will work. But probably better than what I use now....

But just out of curiousity @jthingelstad , where would one put the GA4 code if that should end up being the only option?

jthingelstad commented 2 years ago

But just out of curiousity @jthingelstad , where would one put the GA4 code if that should end up being the only option?

@rebastion I’m not of much help anymore. I haven't looked at this project for multiple years and I also haven't kept up with the MediaWiki ecosystem. I don't have any input.