further-external / loews-dl-spec-ga4

An Apollo generated Event Driven Data Layer
0 stars 1 forks source link

Embed GTM Script #4

Open escohen115 opened 1 year ago

escohen115 commented 1 year ago

Install Google Tag Manager

Copy the code below and paste it onto every page of your website.

Paste this code as high in the of the page as possible:

<!-- 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-M99BJ9H');</script>
<!-- End Google Tag Manager -->

Additionally, paste this code immediately after the opening tag:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M99BJ9H"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

For more information about installing the Google Tag Manager snippet, visit our Quick Start Guide .

JH-SDI commented 1 year ago

@estum1

Please find the GTM containers snippets to paste on production and dev environments:

Production:

Paste this code as high in the of the page as possible:

Additionally, paste this code immediately after the opening tag:

Dev/staging:

Paste this code as high in the of the page as possible:

Additionally, paste this code immediately after the opening tag:

braxton-butcher commented 1 year ago

@brendenconcannon This will also need to be implemented on the main site, moving to "To Do"

Looks good on the booking engine!

brendenconcannon commented 1 year ago

@estum1 - was this implemented on dev preview? Looks like you moved this task last week

estum1 commented 1 year ago

@brendenconcannon yes its on dev preview implemented via the tag manager

JH-SDI commented 1 year ago

@brendenconcannon

Still not present on the DEV lin:

https://loewshotels-preview.dev.cendynecommerce.com/

UN/PW: central/dyanmics

Image

brendenconcannon commented 1 year ago

@JH-SDI - both scripts for the dev site have been added per the direction above. Was the script setup with the correct link? Looks like that direction was provided 3 weeks ago and we provided the new dev link today.

https://app.screencast.com/Ft3m1slTdobhN

@estum1

dbokadiya commented 1 year ago

Image

dbokadiya commented 1 year ago

Both scripts are loading here in https://reservations.loewshotels.nextguestdevelopment.com/ please check, on main site currently we have not done implementation of these events.

JH-SDI commented 1 year ago

@dbokadiya @estum1 @brendenconcannon

Correct, script is there but not on the main site testing environment(https://loewshotels-preview.dev.cendynecommerce.com/):

Image

Moved back to "to do"

estum1 commented 1 year ago

The script itself is giving us a 404 error, but it's in there.

Image

JH-SDI commented 1 year ago

@estum1

The second part of the code is incorrect:

Image

Additionally, paste this code immediately after the opening tag:

Marked as "to do"

JH-SDI commented 1 year ago

@estum1 @brendenconcannon

The testing environment still does not have the GTM container:

Image

Should we test this ticket on Dev or production? none of them has the GTM snippet:

Image

estum1 commented 1 year ago

It's in the code, both parts, this is just the iframe part, the first part is in the header tag and you can see it in the code .

Image

JH-SDI commented 1 year ago

@estum1

The code is in place but it looks like there is a content request that is blocking GTM to load:

Image

estum1 commented 1 year ago

Those are just script tags but i've removed them

JH-SDI commented 1 year ago

@estum1

Could you check the scripts if the "GTM" wording is missing?:

Image Image Image

JH-SDI commented 1 year ago

@estum1 @brendenconcannon

The GTM container is available on production.

Moved to "Complete"