Google tag manager visible on website


(Lydia) #1

Hi, Im working on RW Version 8.1.7 with Lunar theme. I was instructed by my Ad manager to insert Google tag manager in the head of each page but I can see the Google tag manage code on a grey box at the top of my page. Any suggestions how to hide this please? My website is https://imlistening.ca/
Thanks you in advance.
Lydia


(Lydia) #2

I added in the following code in the head for the Google Tag Manager. Please see the attached for reference

< ! – Google Taq Manager -->

<l-- End Google fag Managel -->

and the following in the body:

<iframe src="https:/,/www.googletagmanager.com,/ns.html?id-GTM-TLBBC68TT
height=“0” width=“0” style=“display:none;visibility:hidden”><,/iframe>
<l-- End Google Tag Manager (noscrj-pt) -->


(Doug Bennett) #3

Can’t see what you added above.
edit your post select(highlight) the code and mark it in the post as code </> above what you edit.

In the screenshot above (head section) can’t see what you have (truncated) but I can tell you it doesn’t look right. The first line looks to be an HTML comment and is missing the opening < , and the word tag is misspelled, the spelling doesn’t matter but the line not being a proper comment would. When you copy the code, make sure you copy all of it, and paste as plain text (cmd+opt+v.


(Lydia) #4

does this help?

< ! -- Google Taq Manager -->

<l-- End Google fag Managel -->


(Lydia) #5

36%20PM


(Doug Bennett) #6

To mark code in this form you can select the code
and choose the code button </>

2019-04-12_15-10-36

Or you start a line with three backticks ``` On most keyboards above tab and bellow esc key, paste the code in and on a line by itself tree backticks

2019-04-12_15-15-24
The result would look like this:

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

(Lydia) #7
< ! -- Google Taq Manager -->
<script> (function (w, d, s, I, i) {w If ] -w If ] I [ ] ;w[1] .push ( {' gtm. start' :
new DateO.get?imeO,event:'gtm.js'I);var f:d.getElementsByTagName(s)[0].
j=d.createElement(s),dl:1!:'datalayer'?r&l:'+I:";j.async=true;j.src=
'https://www.googletagmanager.com/gtm.ls?id=r+i+dl;f.parentNode.insertB.efore(j,f);
) ) (window, doclment,' script',' datalayer',' GTM-TLBBC68' ) ; </script>
<l-- End Google fag Managel -->

(Lydia) #8

Hi, I followed your instructions to send original code back to you. May I use the code your have replied with and pop it in the head of each page? Sorry I just wanted to be sure I understood. Thanks


(Doug Bennett) #9

Try remove what you have in the head section and pasting this AS PLAIN TEXT( I took the container number you had in the post above):

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

The code I gave you orignally didn’t have your container number.

The code you had also had some messed up comments.

Here is a link to Googles instructions:


(Lydia) #10

Thank you so much!! It worked… That was some crappy code I received from the Ad guy. Would you be willing to look at this Facebook pixel code to see if it is faulty as well? thanks you!!!

<!-- Facebook Pixel Code -->
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '607287926413650');
  fbq('track', 'PageView');
 fbq('track', 'Lead');
</script>
<noscript><img height="1" width="1" style="display:none"
  src="https://www.facebook.com/tr?id=607287926413650&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->

(Doug Bennett) #11

I don’t know much about FB. But here’s some instructions from them with link to sample code.


(Lydia) #12

Thank you Doug!!! The original code was from a scan - no wonder it was faulty. You’ve been a huge help.
Much appreciated
Lydia