Replies: 2 comments
-
In the config for the Belchertown skin, under "Extras" is where you would put the
Hope this helps |
Beta Was this translation helpful? Give feedback.
0 replies
-
So I put my ID there, but it was still not capturing visits. So I came across a post in the forums about making a header. Inc file and then dumping the analytics code there. I did that, and it has been working. I could never get it to work by just putting the ID in that line; I'm not sure why.
From: ThePeePs ***@***.***>
Sent: Wednesday, October 26, 2022 11:31 AM
To: poblabs/weewx-belchertown ***@***.***>
Cc: Overcon ***@***.***>; Author ***@***.***>
Subject: Re: [poblabs/weewx-belchertown] Google Analytics (Discussion #826)
In the config for the Belchertown skin, under "Extras" is where you would put the googleAnalyticsId key
As an example, it would look like this in weewx.conf:
[StdReport]
...
[[Belchertown]]
...
[[Extras]]]
...
googleAnalyticsId = <your key goes here>
Hope this helps
—
Reply to this email directly, view it on GitHub <#826 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACEPSHTN6FIBT26HK5ONAKLWFFTENANCNFSM6AAAAAARFDPCOI> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ACEPSHUE4VSN6BI44I6LJUDWFFTENA5CNFSM6AAAAAARFDPCOKWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAHSOVY.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I need some help. I know very little about HTML and even less about CSS. A lot of times, I can muddle through to stuff I want to do or I find a good write-up someone has provided that helps a lot.
I want to add my Google Analytics to my weather station. I would like the tag to track all traffic. I found an obscure post that talked about setting up a header.inc file, but not how. Could someone explain, with steps, to get it set up?
I looked at the header.html.tmpl and I see a section that I believe is where I input my analytics information. I guess my question is, do I just take the header.html.tmpl and make a copy in the Belchertown folder called header.inc and add my analytics ID? Do I modify anything else in the file? It seems to have a lot of stuff, and I don't want to mess other stuff up on the site.
So to recap, I need to know what and where do I put a statement(skin.conf, weewx.conf?) to tell Belchertown skin to look for (or add?) the header.inc (header.html.tmpl) that has the GoogleAnalytics statement.
`` #if $Extras.has_key('googleAnalyticsId')
<script async src="https://www.googletagmanager.com/gtag/js?id=$Extras.googleAnalyticsId"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '$Extras.googleAnalyticsId');
</script>
#end if
``
Beta Was this translation helpful? Give feedback.
All reactions