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

grendzy’s picture

Hi! 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!

Plazik’s picture

@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:

It seems your are using Google Analytics Report blocks, which slow down page loading. It is recommended to load these blocks with Ajax via Ajax Blocks module https://www.drupal.org/project/ajaxblocks.

dobe’s picture

I 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.

Plazik’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.