Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Google Analytics Report module has a lot of hard code, which makes difficult to change reports pages.
Proposed resolution
Build reports on Google Analytics Views.
It will also allow us to easily switch to Drupal 8.
Remaining tasks
Write patch.
User interface changes
Users can modify the reports via Views UI.
API changes
Custom templates will be removed.
Comments
Comment #1
grendzy CreditAttribution: grendzy commentedHi! As a previous project maintainer, I wanted to first say thanks for moving this project forward! Second, I think this issue is a great idea.
I do have two suggestions for this issue. When we did the hard-coded report page, part of the reason was we wanted a usable out-of-the-box experience (OOBE) for site builders, without too many dependencies or complex setup. I believe this was beneficial for the project, and lead to more users. Of course the hard-coded page is not customizable, the intent was advanced users would simply disable it and create their own reports with Views and/or the API.
Anyway, I would hope the project will be packaged with nice default Views to continue providing OOBE.
Second, we always thought it was essential that report data use XHR - since synchronous calls to the Google reporting API can otherwise add hundreds of milliseconds to the response time. Perhaps this is out of scope for the analytics module, but could be achieved with something like https://www.drupal.org/project/ajaxblocks ? In that case my hope would be for good testing and documentation support for such a module.
Just my 2¢ – again thanks for your hard work!
Comment #2
Plazik CreditAttribution: Plazik commented@grendzy, thank you for posting your opinion!
1. Yes, I want to build two default Views: one for dashboard page, one for blocks. I haven't mention in topic post but switching to Views helps us to solve #1410906: Setup multiple reports profiles issue (I'm planning to add profile section in advanced settings in Views).
2. I'm planning to add simple check on Drupal reports page with
hook_permission
. Something like this:Comment #3
dobe CreditAttribution: dobe as a volunteer commentedI have combined all the patches so it is just one. It will hopefully make it easier for applying so we can get this to dev.
Comment #4
Plazik CreditAttribution: Plazik as a volunteer commentedFixed in #2488754: OAuth & Charts, Integration.