Merge branch 'questionnaire' into 'main'
feat: add google tag manager See merge request witapp/aura-webapp!34
This commit is contained in:
commit
70075742d6
10
index.html
Normal file → Executable file
10
index.html
Normal file → Executable file
@ -74,6 +74,16 @@
|
||||
alt=""
|
||||
/></div
|
||||
></noscript>
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript
|
||||
><iframe
|
||||
src="https://www.googletagmanager.com/ns.html?id=GTM-P3Q4DBBT"
|
||||
height="0"
|
||||
width="0"
|
||||
style="display: none; visibility: hidden"
|
||||
></iframe
|
||||
></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
<div id="root">
|
||||
<div class="splash-screen">
|
||||
<img src="/leo.png" alt="Aura - Energy of your Horoscope" />
|
||||
|
||||
5
public/metrics/google-manager.js
Executable file
5
public/metrics/google-manager.js
Executable file
@ -0,0 +1,5 @@
|
||||
(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-P3Q4DBBT');
|
||||
7
src/init.tsx
Normal file → Executable file
7
src/init.tsx
Normal file → Executable file
@ -52,6 +52,13 @@ const init = async () => {
|
||||
document.head.appendChild(script);
|
||||
};
|
||||
smartLook();
|
||||
|
||||
const googleManager = () => {
|
||||
const script = document.createElement("script");
|
||||
script.setAttribute("src", "/metrics/google-manager.js");
|
||||
document.head.appendChild(script);
|
||||
};
|
||||
googleManager();
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user