Problem/Motivation
Table ad_track_event grows large very fast. Just after some days it has grown to 4.9 GB.
It should therefore allow to be limited to clicks only.
Also, we should inform users about this to be aware! Tracking every view is just far too much.
Steps to reproduce
Use event tracking on a highly frequented project and see the table grow extremely fast!
Proposed resolution
We will create a settings page for the ad_tack module with the following settings:
Totals tracking
- Track total impressions (Enabled via update hook)
- Track total clicks (Enabled by default)
Event tracking
- Track impression events (Enabled via update hook)
- Track click events (Enabled via update hook)
Event metadata
- IP address (Disabled)
- User agent (Enabled via update hook)
- URL (Enabled by default)
- Page title (Enabled by default)
- Referrer (Enabled by default)
[Clear event data] (Button to flush the ad_track_impression table)
Ideally the settings should already be taken into account in the JS library, so that, when neither total nor event tracking is enabled for an event type (click / impression), no request to the controller is made at all to save on performance.
There should also be a warning message on the settings page when the ad_track module is not enabled to inform the user of the fact. Warnings in the settings descriptions are also necessary for settings that may lead to performance impacts or huge storage increases on larger sites.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork ad-3587809
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyHaving ad_track_total is probably also enough for many cases. We should discuss how to improve that and make it configurable in general.
Comment #3
anybodyComment #4
anybodyAs a workaround we for now disabled ad tracking in general.
Comment #6
lrwebks commentedInitially there was a view at some point which allowed admins to view more detailed information about the ad impressions (including a graph over time). So that's where the need for all the metadata in
ad_track_eventstems from. I do not believe that the view is currently used anymore. If so, it is definitely not using the most up-to-date data model that we have established in 11.x. So I see a few possible options here among others:ad_track_eventand only incrementad_track_totalinstead of deriving the total tally from the event table@anybody, what would you be most in favor of?
Comment #7
anybodyI think we need a settings based version of (2). Let's discuss this in person.
Comment #8
lrwebks commentedDiscussed with @anybody, I will update the issue summary to reflect our plans for this.
Comment #9
lrwebks commentedComment #11
lrwebks commentedComment #12
anybodyComment #13
lrwebks commentedComment #14
anybodyOkay I think this is a huge and important improvement! Let's merge this.
Next very important follow-up is having tests for all that.
Comment #15
anybody