-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a function to piwik.js to hook an external js file that can be fired when piwik.js is not #134
Conversation
Custom event tracking is currently in development. https://github.com/piwik/piwik/tree/cevents |
Ok, well; I will be working on event visualization the next 4-5 months nearly full time so |
2.0 is few weeks away from release. Great to hear you will work on Piwik, will you release it as open source or contribute back to Piwik core? if so please get in touch! |
Oh good news ! |
Dear Matt, I went through the new Piwik (2.0 branch cevents) and focused on particular on this event tracking. What came out is that you can track new events and they will be saved in the log_list_visit_action table. This means, each event has a URL and each Event is a new Action. From what I understand, an Action can be defined as a pageview. As you clearly explained it, an event will be defined by a category, an action, a name and a float (e.g: Movie, Play, Spirit Away, TimeSpent). Now, what I have in mind as event tracking is not quite the same (and should maybe really be two separate things). Instead of trying to define what I define as an event, I'll focus on explaining my goal .
There are many other behavior patterns I would like to track, but this is just to give you an idea. (tracking computer + mobile events) == What I tried/did == One solution to overcome that problem without touching the core would be to save data into cache instead of in the database (the heatmap plugin for piwik does that). I don't like that solution as I think it is slow (writing and reading) and I cannot link the data I have in my cache with the data in piwik's database (so I don't see how I could be able to link a certain behavior to a certain visit in log_visit). All in all (and sorry for the long ticket), I don't know whether you would see a simple solution for a plugin (I am still discovering Piwik's structure, so maybe I missed something), or if you think this solution could be part of core, or something else :) What should be kept in mind is that my tracking would be "heavy" since tracking everything, and should be a kind of tracking only used couple days/weeks to see some patterns appear. This approach is not meant to stay "on" all the time, but to focus really on user problems when a new product is out. Anyway, I work on new ways to visualize data (user engagement on website/games) for my Master project, and I would love to be able to rely on Piwik's core instead of writing my own small analytic tool from scratch ! |
Wait a few days and check again my cevents branch, it's under development, and it should hopefully work for you. Let's discuss again in two weeks or so, stay tuned! |
Dear Matt, |
Adding a new function to piwik.js in order to be able to hook an external js file that could be fired when piwik.js is not fired.
E.g. to track scrolls, piwik.js is not fired. In order not to rewrite the entire getRequest method from piwik.js, add the possibility to hook an external js file which takes care of this new tracking and can then use the core to send the request.