Scripler / scripler

The Scripler web application source code repository
Do What The F*ck You Want To Public License
5 stars 1 forks source link

Set up google tag manager #940

Open Abekonge opened 9 years ago

Abekonge commented 9 years ago

We need to set up a way of tracking javascript events in the Scripler app. If we use Google tag manager we can do this without having to involve web-developers every time we want to set up new events.

To add Google Tag Manager to a site, add the following code onto every page of your website. Place it immediately after the opening tag.

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-MVL8JW"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<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=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MVL8JW');</script>
<!-- End Google Tag Manager -->
Abekonge commented 9 years ago

@allanmc unless you have any hard objections?

allanmc commented 9 years ago

@Abekonge No objections - but i'm not completely sure what it can do :)

mortengf commented 9 years ago

This should be applied to: