[TYPO3-english] Re: Google Analytics - insert javascript with page.headerData

2017-11-12 Thread Christian Hackl

hmm 

you can try, to seperate it:

50 = TEXT
.. first

51 = TEXT
.. second


But it shoold be no difference in the output. h...
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Re: Google Analytics - insert javascript with page.headerData

2017-11-12 Thread Dennis Hoffland

Hello,

I did some further investigation.

I am using the scriptmerger extension.

For reasons not entirely clear to me the first section of my javascript turns up 
seperately in my page header, while the second section becomes part of the merged 
javascript 
(/typo3temp/scriptmerger/compressed/head-b15c2d1e76d0f77c7d3249fcc4d6ca05.merged.gz.js). 
Although it seems to "disappear" in the source code, the second javascript 
section is in fact now part of the merged javascript.

Mistery solved!

Kind regards,

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


[TYPO3-english] Re: Google Analytics - insert javascript with page.headerData

2017-11-12 Thread Dennis Hoffland

Just to be clear: I am using TYPO3 CMS 7.6.22
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Re: Google Analytics - insert javascript with page.headerData

2017-11-12 Thread Dennis Hoffland

Hello Christian,

If I use the standard textbook code as you suggested and replace


// YOUR JS CODE


with


https://www.googletagmanager.com/gtag/js?id=UA-xxx-x";>

 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-xxx-x');


I get the same outcome as described in my first post:


https://www.googletagmanager.com/gtag/js?id=UA-xxx-x";>

shows up in my HTML page header, and


 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-xxx-x');


is somehow ignored.

My conclusion: my TS is in principle OK, however the (syntax? of the) second 
section of the javascript causes some processing issue.

Any thoughts?

Kind regards,

Dennis


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