GeneralMagicio / gm-planning

This repository is used for planning General Magic projects
2 stars 0 forks source link

Install Google Analytics on GM Website #97

Closed markoprljic closed 2 years ago

kkatusic commented 2 years ago

@markoprljic who can provide GA code?

markoprljic commented 2 years ago

MoeShehab or Ahmad.

On Mon, Aug 22, 2022, 09:25 kkatusic @.***> wrote:

@markoprljic https://github.com/markoprljic who can provide GA code?

— Reply to this email directly, view it on GitHub https://github.com/GeneralMagicio/gm-planning/issues/97#issuecomment-1221957101, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLQUXKNIECGLZD3US4AWSDV2MTNBANCNFSM53X7JZTQ . You are receiving this because you were mentioned.Message ID: @.***>

ahmadabugosh commented 2 years ago

Hey @kkatusic , I recommend to use Google Tag Manager instead. That way we can easily add any future tags there (including GA, Google ads etc).

Can you please include the following:

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

In the < body >

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

Hi @ahmadabugosh , thx.

I think @luizakp will implement it, I don't work on this project, I thought this was for GM Swag Shop :)

ahmadabugosh commented 2 years ago

@kkatusic no worries! Actually, you can add the same code on the swag shop as well (it would make it easier for us to track if we use the same pixel).

kkatusic commented 2 years ago

@ahmadabugosh I added it to Swag Shop, you can check it ;)