Hello,

I have put the following code into the TS Setup of my root page:

# *****
# Google Analytics
# *****

temp.GoogleAnalytics = TEXT
temp.GoogleAnalytics.value (
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async 
src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x";></script>
<script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());
ga('set', 'anonymizeIp', true); // Toelichting AP: Hiermee zet u de 
IP-maskering aan
 gtag('config', 'UA-xxxxxxx-x');
</script>
)

page.headerData.50 = TEMPLATE
page.headerData.50.template < temp.GoogleAnalytics


The HTML output only contains:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async 
src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x";></script>

The second section of the javascript is simply missing ...


If I try instead:

# *****
# Google Analytics
# *****

page.headerData.50 = TEXT
page.headerData.50.value ( <!-- Global site tag (gtag.js) - Google Analytics -->
<script async 
src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x";></script>
)
page.headerData.60 = TEXT
page.headerData.60.value ( <script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());
ga('set', 'anonymizeIp', true); // Toelichting AP: Hiermee zet u de 
IP-maskering aan
 gtag('config', 'UA-xxxxxxx-x');
</script>
)

It produces the same result:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async 
src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx-x";></script>

Is there something wrong with the syntax that prevents the second javascript 
section from being rendered?

Kind regards,

Dennis
_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to