Hi,
I'd like to track access to pages with certain parameters in the urls.
I want to track the whole history of these pages and associate them with the session (cause).
Then when a special event occur (effect) I want to associate it with the session and the history.
I want to correlate causes and effects even before login / registration when sid is regenerated.
I was wondering if there are similar modules before reinventing the wheel or at least any module that could be an inspiration for writing my own.
Right now I'm not looking for advices about implementation of such a beast[1] (even if they will be welcome) but mainly I'd appreciate if someone could point me to an already existent module that already does this or something very similar.
[1] a cookie could simply solve the sid regeneration problem.
On Thu, Dec 10, 2009 at 2:19 PM, Ivan Sergio Borgonovo mail@webthatworks.it wrote:
Hi,
I'd like to track access to pages with certain parameters in the urls.
Google Analytics?
I'd like to track access to pages with certain parameters in the urls.
Google Analytics?
On Thu, 10 Dec 2009 23:13:44 +0200 Fred Jones fredthejonester@gmail.com wrote:
I'd like to track access to pages with certain parameters in the urls.
Google Analytics?
I'm already using Google Analytics (and related drupal module). I'll give a look to piwik, since I'd prefer not to share my data with Google (there should be a piwik module too).
But it seems it doesn't suit: - I'd like to use it for affiliates - I'd like to use it to track advertisement campaign and offer an interface to build them - I'd like to avoid js
Any other module that could fit or just be an inspiration?
thanks
On Fri, 11 Dec 2009 00:20:02 +0100 Ivan Sergio Borgonovo mail@webthatworks.it wrote:
On Thu, 10 Dec 2009 23:13:44 +0200 Fred Jones fredthejonester@gmail.com wrote:
I'd like to track access to pages with certain parameters in the urls.
Google Analytics?
I'm already using Google Analytics (and related drupal module). I'll give a look to piwik, since I'd prefer not to share my data with Google (there should be a piwik module too).
But it seems it doesn't suit:
- I'd like to use it for affiliates
- I'd like to use it to track advertisement campaign and offer an interface to build them
- I'd like to avoid js
I decided to write something of my own. The idea was I want to track hit history that took to an event. I don't want to track all hits, but just selected ones containing a parameter in the url.
I'd like to build up a sort of API.
Several modules *may* trigger "events" (events looks like "actions" in D6 somehow). Modules *may* provide advanced event logging (extra data).
Part of the problems are in these *may*.
That may imply an abuse of "function_exists". Another problem is turning on and off extra data logging.
Currently I have a function that "relate" hit history to events.
function tracky_event() { $args = function_get_args(); $event = array_shift($args); // save and return eventid // ... $args = array_unshift($args, $eventid); module_invoke_all('tracky_'.$event, $args); }
Now I can build for each module/event an additional module that will log extra data and have install/uninstall function for tables that will store extra data.
Now I could define the extra data logging modules in other modules so that table creation and extra logging becomes optional.
I got this working but: - I didn't get rid of the function_exists problem if I really want to make my modules optionally dependent on the general tracking module. - naming of hooks and modules is going to be a pain - having finer control on what events I want to log with more details a) requires a module for each module/hook b) hand made install/uninstall function for each event I'd like to track
Is there something I miss that drupal offers that could make all this cleaner?
On Thu, 10 Dec 2009 Ivan Sergio Borgonovo wrote:
But it seems it doesn't suit:
- I'd like to use it for affiliates
- I'd like to use it to track advertisement campaign and offer an interface to build them
- I'd like to avoid js
Any other module that could fit or just be an inspiration?
http://drupal.org/project/gotwo
-- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/
On Mon, 04 Jan 2010 21:16:58 +0000 Earnie Boyd earnie@users.sourceforge.net wrote:
On Thu, 10 Dec 2009 Ivan Sergio Borgonovo wrote:
But it seems it doesn't suit:
- I'd like to use it for affiliates
- I'd like to use it to track advertisement campaign and offer an interface to build them
- I'd like to avoid js
Any other module that could fit or just be an inspiration?
thanks... nice idea but if used heavily will cause too many redirect.
I've built a module that seems to work. I use hook_init to share a unique identifier across all modules. hook_exit saves hits and the unique identifier according to certain conditions. Other modules can call a function defined in this module to relate events to unique id and optionally with other sub-modules have a chance to collect other details, so that collection of details become "optional".
Then there is a hook_cron that clean up registered hits if they didn't end up in anything "interesting".