Closed (works as designed)
Project:
Google Analytics Tokenizer
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2010 at 07:43 UTC
Updated:
22 Apr 2011 at 14:56 UTC
Comments
Comment #1
Brian294 commentedSina,
I like where you are going with this request.. very valuable information! but, i'm not aware of that data being stored in any of the google analytics cookies, do you? I think what I might do is write a sub module that handles all of the click tracking logic and then expose it as a token. What information matters to you?:
1. Google's Unique Visitor ID #
2. Page URL
3. Page Title
4. Page Visited (date/time)
I could probably capture each each of those values and store it as a multi-value array. The tricky question is where we store it. SESSION? Persistent COOKIE? DATABASE? If we store it as a persistent cookie or database, that Google Visitor ID could be used to link multiple visits over multiple days.
Peace,
Brian
Comment #2
sinasalek commentedGlad to see you're also interested :)
I think it's better to either use COOKIE (via Javascript) or use google analytics api module to fetch visitor visits via visitorid which is stored in cookie.
PS : Both SESSION and DATABASE do not work properly when caching or heavy caching modules are enabled.
Comment #3
Brian294 commentedWell, sites that use Normal caching can be resolved by using hook_boot or hook_exit instead of hook_init. But Aggressive caching would definitely bypass everything. Not to mention the sites that might be using reverse proxy caching to deliver sites as static HTML.
Yes, a Javascript cookie option would fix all of those problems. Good insight!
Do you fall into any of the categories above (Aggressive / Reverse Proxy caching)? I may implement a server-side option first as quick fix and then work out the Javascript when I have more time. I honestly don't do much javascript programming. :-\
Peace,
Brian
Comment #4
sinasalek commentedCurrently i'm using Boost for static caching. and also setting up varnish to use for another site.
Let me know when you've implemented the server side, i can help with client side implementation if you like ;)
Comment #5
silkogelman commentedI'd love to have 'Google's Unique Visitor ID #' available as a token, is it possible to extract that from the cookie Brian?
I think with that ID you can collect whatever Analytics user data you want to use in Drupal in combination with the Google Analytics API module: http://drupal.org/project/google_analytics_api
I did not test this yet however.
kind regards,
Sil
Comment #6
Brian294 commentedSina,
I love this idea and I'm going to pursue it with a separate project on drupal.org. When I eventually get it setup, I'll make you a maintainer for the project.
Peace,
Brian
Comment #7
sinasalek commentedThat's great :)
Comment #8
sinasalek commented