Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from Google Analytics to Google Tag Manaer #105

Closed
3 tasks done
keithmifsud opened this issue Jul 21, 2018 · 0 comments
Closed
3 tasks done

Move from Google Analytics to Google Tag Manaer #105

keithmifsud opened this issue Jul 21, 2018 · 0 comments

Comments

@keithmifsud
Copy link
Contributor

keithmifsud commented Jul 21, 2018

Superseded learnk8s/team#18

  • Replace Google Analytics with Google Tag Manager. Instructions:

The following code should be placed in the <head>:

<!-- 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-5WCKPRL');</script>

<!-- End Google Tag Manager -->
  • The following code should be placed at the beginning of body:
<!-- Google Tag Manager (noscript) -->

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5WCKPRL"

height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

<!-- End Google Tag Manager (noscript) -->
  • You should remove the old GA tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant