Tracking Google Analytics events with server side request automation

Posted by Esko on Stack Overflow See other posts from Stack Overflow or by Esko
Published on 2010-04-07T09:35:56Z Indexed on 2010/04/07 10:53 UTC
Read the original article Hit count: 604

I'm currently in the process of programming an utility which generates GA tracking pixel (utm.gif) URL:s based on given parameters. For those of you who are wondering why I'm doing this on the server side, I need to do this server side since the context which I'm going to start tracking simply doesn't support JavaScript and as such ga.js is completely useless to me.

I have managed to get it working otherwise quite nicely but I've hit a snag: I can't track events or custom variables because I have no idea how exactly the utme parameter's value should be structured to form a valid event or var type hit. GA's own documentation on this parameter isn't exactly that great, either.

I've tried everything from Googling without finding anything (which I find ironic) to reverse engineering ga.js, unfortunately it's minified and quite unreadable because of that. The "mobile" version of GA didn't help either since officially GA mobile doesn't support events nor vars.

To summarize, what is the format of the utme parameter for page hit types event and custom variable?

© Stack Overflow or respective owner

Related posts about google-analytics

Related posts about server-side