Link Analytics and AdSense

Posted in: Newspaper
Post count: 419

I would like to Link Google Analytics and AdSense. I followed their instruction to the point where they instruct me to Install Google Tag Manager by :
1. Paste this code as high in the <head> 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-K3T7FFD’);</script>
<!– End Google Tag Manager –>

2. Additionally, paste this code immediately after the opening <body> tag:
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-K3T7FFD&#8221;
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>

Questions:
1. is this ok that I do?
2. Could U tell me how to add these 2 codes…

Thank you

Post count: 23312

Hello mayaguez,

1)Please notice that our theme has an analytics section where you should add your proper code, like this -> https://www.screencast.com/t/OlOkqEBu
2)Regarding on your second code, I do not know about it. All the Adsense code should have to be added in Theme panel-> Ads section, like this -> https://www.screencast.com/t/Lu4LM3Gdql For more information about Ads, please consult our guide here -> https://forum.tagdiv.com/header-ads-adsense/

Thanks for your understanding!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.