Page 1 of 1

Google Tag module

Posted: Fri Feb 24, 2023 1:57 pm
by Omar_one
Hello,
what is the best way to create Google Tag module as module or as a hook?
the Google recommends putting GTM code :
one code as high in the <head> and another code right after opening <body> tag

does anyone has create Google Tag module?

Br
Omar

Re: Google Tag module

Posted: Fri Feb 24, 2023 3:17 pm
by LeeFoster
Omar_one wrote: Fri Feb 24, 2023 1:57 pm Hello,
what is the best way to create Google Tag module as module or as a hook?
the Google recommends putting GTM code :
one code as high in the <head> and another code right after opening <body> tag

does anyone has create Google Tag module?

Br
Omar
@zipurman created this one.

app.php/addons/paid_addon/google_analytics_4/

Re: Google Tag module

Posted: Fri Feb 24, 2023 3:33 pm
by Omar_one
LeeFoster wrote: Fri Feb 24, 2023 3:17 pm @zipurman created this one.

app.php/addons/paid_addon/google_analytics_4/
Thank you @LeeFoster
I have that module .. now I am confuse.. as always :D :D ...
I was think its need different module?!!

thank you

Re: Google Tag module

Posted: Fri Feb 24, 2023 4:12 pm
by LeeFoster
Omar_one wrote: Fri Feb 24, 2023 3:33 pm
LeeFoster wrote: Fri Feb 24, 2023 3:17 pm @zipurman created this one.

app.php/addons/paid_addon/google_analytics_4/
Thank you @LeeFoster
I have that module .. now I am confuse.. as always :D :D ...
I was think its need different module?!!

thank you
I don't have that module so can't confirm, I am assuming you are using it for Google analytics tracking though

Re: Google Tag module

Posted: Tue Feb 28, 2023 9:22 pm
by Yahalimu
Hello,
I think I hard coded the GTM and put in in the <body> area.
EU GDPR rules specify if the user does not specifically allow 'un-necessary' cookies via a cookie warning, the google analytics code should not be active. (Very few sites seem to implement this).
If set correctly the GTM is one way to switch off all tracking cookies if not allowed by the site visitor.
Its a real pain to set up to be honest.