Friday, February 08, 2008 - Posts

Friday, February 08, 2008
Posted by fractalnavel at 6:32 PM | with no comments
Filed under:

couldn't resist the oz reference ;-)

posted to cs forums 

i wasn't getting any page titles reported in ga, and i wondered what was going on.  at first i thought it was because the title tag content was rendered on separate lines, and i was thinking i'd have to modify cs somewhere.  you'd think that such a thing would be noticeable to the community (both ga & cs), but i searched and found nothing.

while digging around it occurred to me that the ga script, placed in the head section as suggested by a post in that thread linked above, came before the location where the title tag was rendered. ok, duh - that was it.  no title data since it's not there when the script runs.

next problem: where to put the script below the title.  ideally, analytics scripts are put in page footers.  in the prior version of ga they recommended putting the script library reference in the head section, and then actually doing the settings and calls right before </body>.  this is what i've done for a customer, and i used a shared set of asp.net user controls to do this consistently across several applications (basically using them as "includes").

now that's too heavyweight for this personal stuff, and i really didn't want to get into modfiying the standard themes.  then it occurred to me that there was already a setting for some custom content near the bottom of the page - the copyright notice.  so i slapped the script calls into there, while leaving the library loading stuff in the "raw header".

it's too early to see the new data at ga to see if that has the desired effect, but i'm fairly confident that it will.  also mitigates any potential performance hits.

coooll.

thought: why is there no <foot/> in html ?  hmmm...


update: yup, that did the job.

Posted by fractalnavel at 1:56 PM | with no comments
Filed under: ,