Page 1 of 1

Google Analytics

Posted: Fri 12 Aug 2022 7:28 pm
by dale
I've searched this forum and the Wiki, but do not find anything recent that is helpful....Can someone advise me on the best way to add Google Analytics 4 to the standard webfiles that are packaged with the latest CumulusMS (build: 3196)? in particular, is there an easy way with the current structure of the pages to just add the analytics code in one place, or must it be added to all the .htm pages?

Thanks.

Re: Google Analytics

Posted: Fri 12 Aug 2022 8:14 pm
by HansR
I don't use the standard webfiles myself but afaik there is no standard entry indicated for the analytics so you have to create it yourself in the <HEAD> section of all htm of the standard webfiles you will be using.

The tracking code for G4 is similar to that of UA, you only need to add the G4 tracking code.

I find this page very educational.
I did not read this one but it is on my list.

Re: Google Analytics

Posted: Fri 12 Aug 2022 9:24 pm
by dale
Thanks, Hans.

Re: Google Analytics

Posted: Sat 13 Aug 2022 5:01 am
by sfws
dale wrote: Fri 12 Aug 2022 7:28 pm is there an easy way with the current structure of the pages to just add the analytics code in one place, or must it be added to all the .htm pages?
I don't use the default website pages, but since setpagedata.js is referenced by every page within the provided webfiles folder, and the analytics code uses JavaScript, perhaps it could be possible to make a modification in one place.

There are a number of Cumulus users who use Google Analytics, but they are not regular contributors, so they may not respond.

Re: Google Analytics

Posted: Sat 13 Aug 2022 7:26 am
by HansR
sfws wrote: Sat 13 Aug 2022 5:01 am
dale wrote: Fri 12 Aug 2022 7:28 pm is there an easy way with the current structure of the pages to just add the analytics code in one place, or must it be added to all the .htm pages?
I don't use the default website pages, but since setpagedata.js is referenced by every page within the provided webfiles folder, and the analytics code uses JavaScript, perhaps it could be possible to make a modification in one place.

There are a number of Cumulus users who use Google Analytics, but they are not regular contributors, so they may not respond.
@sfws: Not really sure that is going to work as @dale uses the old standard website : http://narnia.dejagers.net/narniaweather/ (see his profile).
If that is wrong @dale needs to adjust his profile but date and time seems correct.

Re: Google Analytics

Posted: Sat 13 Aug 2022 8:49 am
by sfws
dale wrote: Fri 12 Aug 2022 7:28 pm the standard webfiles that are packaged with the latest CumulusMS (build: 3196)

Re: Google Analytics

Posted: Sat 13 Aug 2022 8:59 am
by HansR
@sfws: with discrepancies between observation and what is written, I choose for observation :D

But i assume you are correct in what he meant.

Re: Google Analytics

Posted: Sat 13 Aug 2022 2:21 pm
by dale
Thanks for the replies. Actually I'm switching over to the latest version of CumulusMX and the web pages (not yet active on my site) and that is what I was asking about. Hopefully I'll have the new one up today or tomorrow.