[Tiki-devel] Where to put the new GA4 codes?
Jay Williston <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi.. I've tried EVERYTHING.. but can't seem to find a way to put this
code in the header area (not the body). Everything I try breaks the site.
Notice this is not the UA code google used to use.. it's the new GA4
code that Google Analytics is using now.
So, I can't use the Google Analytics plugin because it puts a UA in
front of it.. and.. uses a different script. It also puts the code in
the body and not in the head! (client insists it has to go in the head tag)
I've tried to include this in the header.tpl It breaks the site
- I can throw in a "<script></script>" but any more than that and it
breaks the site
I've tried to use this Look/Feel >> Customization >> Custom HTML head
content... .and it breaks the site
- I've tried it with and without comment tags..
Thoughts?
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TJ62RTB');</script>
<!-- End Google Tag Manager -->
--
Jay Williston
He/Him (What's this?
<https://www.thehrcfoundation.org/professional-resources/talking-about-pronouns-in-the-workplace>)
IRN Internet Services
PO Box 1428
Fitchburg, MA 01420
617-417-5749
_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel