So, to clarify, the header.html.tmpl is a used file and not just a template file? I created a header.inc file and put
From: [email protected] <[email protected]> On Behalf Of Seth Ratner Sent: Saturday, October 15, 2022 6:30 PM To: [email protected] Subject: Re: [weewx-user] Re: Belchertown - Adding Matomo Analytics script header.html.tmpl has code to look for header.inc, and if it exists, include the contents. So just put the analytics script into a new file called header.inc and that should do it. If you are just using Google analytics, the it goes in the configuration (skin.conf), no new files needed. On Sat, Oct 15, 2022, 18:53 Mitchell Tuckness <[email protected] <mailto:[email protected]> > wrote: I am not much of a HTML guru; most of the time, I can muddle through to get stuff working. Can I ask how I get the Belchertown skin to notice the header.inc? 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, but I assume somewhere in the skin.conf or something you have to tell it there is a header.inc? Thanks! On Sunday, September 11, 2022 at 10:03:02 AM UTC-6 Seth Ratner wrote: Looks like the answer was to create 'header.inc' and put the code there. Oddly, page-header.inc is another option but doesn't seem to work. Thanks for pointing me to header.html.tmpl, it had #if os.path.exists("header.inc") #include "header.inc" #end if Which pointed me to creating header.inc with the desired tracking code. On Saturday, September 10, 2022 at 12:02:35 PM UTC-5 vince wrote: Quick look at the header's tmpl file seems to indicate you can add something there similar to the Google Analytics code that is there... On Friday, September 9, 2022 at 9:32:17 PM UTC-7 Seth Ratner wrote: Hey everyone, Has anyone come up with the best way to add a tracking script such that all pages will have it? I've tried using the .inc files Belchertown supports, but that only tracks the homepage. The header or footer seems like the most obvious solution, but I'm not sure how to make it work. Thanks, Seth -- You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/aBWNJ_VJqIA/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/31b9cfd9-992b-4378-967e-862dbb2ad716n%40googlegroups.com <https://groups.google.com/d/msgid/weewx-user/31b9cfd9-992b-4378-967e-862dbb2ad716n%40googlegroups.com?utm_medium=email&utm_source=footer> . -- You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/aBWNJ_VJqIA/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAHTssjNHwmOy5tMqG9SZsF%3DPWKa_%2BgD%3DmgCLvEavxbguyOeFwQ%40mail.gmail.com <https://groups.google.com/d/msgid/weewx-user/CAHTssjNHwmOy5tMqG9SZsF%3DPWKa_%2BgD%3DmgCLvEavxbguyOeFwQ%40mail.gmail.com?utm_medium=email&utm_source=footer> . -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/01a801d8e114%24f6e64030%24e4b2c090%24%40maladomini.com.
