-
Notifications
You must be signed in to change notification settings - Fork 14
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
Integrate GA library for tracking download events #314
Comments
@acorbi i think this is currently logged as page view. Right ? Can you explain a bit why this one needed as event ? |
@DragonVirus It should be registered as page view yes. however I would suggest to track this as event as well in order to have more structured/cohesive data to analyze user's behaviour. It might be more convenient to have those events in order to compare with the download events, that way we can know the amount of users which drop-off the dataset detail pages without downloading a resource. |
The new google analytics javascript library could be integrated into the wpckan plugin (or even better into the wp-odm_theme theme in order to be accessible by all the plugins) and used for tracking dataset download events. Concretelly, following events should be tracked:
When the dataset detail page is loaded, an event dataset_view would be sent to GAnalytics containing the id of the dataset in question.
When the user clicks on the download button for a dataset's resource, an event resource_download would be sent to GAnalytics containing the id of the dataset and the id of the resource.
OPTIONAL: When the user user clicks on a related dataset listed on the sidebar, an event related_dataset_link would be sent to GAnalytics containing the id of the dataset the user is being linked to.
Integrate GA javascript library (optimally via composer)
Create additional js file under /js/ which contains javascript code
The text was updated successfully, but these errors were encountered: