Search…

X3 Photo Gallery Support Forums

Search…
 
Jorge Aguilar2
Topic Author
Posts: 2
Joined: 17 Nov 2022, 15:28

Google Tag Manager (2022)

21 Nov 2022, 14:20

Hello, Greetings! I need help adding the Google Tag Manager tool to my site jorgeaguilar.mx. We tried to locate the HTML files, but we couldn't. I need to add the HTML code inside the HEAD tag and inside the BODY tag. Could you help us with this topic? My meeting with Google's Technical Solutions Team is scheduled for 30/11/2022 18:00 Paris time, it would be amazing if you could join and help us in line with this topic.
 

 
Could this first code be added inside the HEAD tag of all pages?
-------
<!-- 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 ... efore(j,f);
})(window,document,'script','dataLayer','GTM-P5K6KJS');</script>
<!-- End Google Tag Manager -->
 
 
 
Could this first code be added inside the BODY tag of all pages?
-------
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P5K6KJS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Google Tag Manager (2022)

21 Nov 2022, 23:36

X3 is a CMS (content management system), so there are no "HTML pages".
Jorge Aguilar2 wrote: <!-- 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 ... efore(j,f);
})(window,document,'script','dataLayer','GTM-P5K6KJS');</script>
<!-- End Google Tag Manager -->
You would just paste this into Settings > Custom > Custom <head>. The above will get added into the <head> of all pages.
 
Jorge Aguilar2 wrote:<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P5K6KJS"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
This can be added to Settings > Page [tab] > Include > Content append.
 
Jorge Aguilar2
Topic Author
Posts: 2
Joined: 17 Nov 2022, 15:28

Re: Google Tag Manager (2022)

28 Nov 2022, 21:21

Muchas gracias!, saludos!.
Thank you very much!, Greetings.