Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2616

Joomla! 4.x Coding • Re: How to Insert Google Tag Manager into Cassiopeia?

$
0
0
Hey there so I am new to this forum and have a question that is related to the solution provided by Pavel-ww above.

In the above solution when you create a Child Theme + Duplicate the index.php to that child theme, is it possible to add scripts that only target specific Pages, Categories or Languages?

For Example, say I would like to include the below script in the <head> tag but ONLY on the en-US Contact Page;

<script>
console.log('Contact Page Script ONLY')
</script>

and then at the same time display the script below on all pages except on the en-US Contact page

<script>
console.log('Script for ALL pages except the CONTACT page')
</script>

etc.

I have been using various modules to achieve this for years and it does work but it seems like every 4 years or so the third-party extensions I use are either no longer supported or break or are removed from the JED (see the example above for the Phoca Site solution proposed).

I would just really like to understand, once and for all what the actual correct way of doing this is? Thanks in advance.

Statistics: Posted by DennisF — Tue Jan 16, 2024 12:35 pm



Viewing all articles
Browse latest Browse all 2616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>