Merge branch 'questionnaire' into 'main'

feat: add google tag manager

See merge request witapp/aura-webapp!34
This commit is contained in:
Victor Ershov 2024-02-04 20:22:54 +00:00
commit 70075742d6
3 changed files with 22 additions and 0 deletions

10
index.html Normal file → Executable file
View 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" />

View 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
View 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>