I'm doing a transparent checkout like 'braip', 'kiwify', 'yamp'...
I would like to know how to change a variable inside index.template.html on quasar based on vuex property.
Explaning:
I have many pages -
mypage/userId/ProductId.
Each product ID will have a unique google tag manager ID. Which i must configurate on HTML load.
this is my script inside index.template.html:
<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-XXXXXXX')
</script><!-- End Google Tag Manager -->
The "GTM-XXX" is based on the router user is visiting.
I would like to take the google tag from my server when user loads a page, than i could get this info from my vuex getters and pass it to the index.template.html