[TYPO3-english] Typoscript not adding variable into google analytics code for tracking user groups

Baber Ahmed baber.ahmed at wisetiger.co.uk
Thu Jan 19 17:14:00 CET 2012


Good Afternoon All,

I am having trouble with some typoscript for tracking usergroups in google
analytics? Please see below for my typo script, the google tracking for the
website is working fine, but I can not get my custom variable to track :(,
Please help.


## load dynamic google tracking for usergroup
page.headerData.74 = COA
page.headerData {
10 = TEXT
10.data = TSFE:fe_user|user|usergroup
10.split {
token = ,
max = 1
cObjNum = 1
1 {
10 = CONTENT
10.table = fe_groups
10.select.pidInList = 27
10.select.andWhere.current = 1
10.select.andWhere.wrap = uid=|
10.renderObj = TEXT
10.renderObj.field = title
10.renderObj.wrap = <script
type=*"text/javascript"*>pageTracker._gaq.push(['_setCustomVar',1,'client','|',2]);
pageTracker._trackPagevie();</script>
}
}
}

Kind Regards
Bob


More information about the TYPO3-english mailing list