I like the Google Analytics Summary default report but would like to make changes such as using a different chart style or pulling different data to present. After reading issues, and the documentation I have yet to figure this out.
Is the documentation http://drupal.org/node/1138274 for using the API or customizing the default report?
I've tried putting the examples in php blocks and pages, I also tried hook_chart_alter() in template.php
The only way to change things was to edit the module files.
I'm probably missing something simple, but I figured if I didn't understand it there might be others.
If you don't want to separate the module maybe just clarify/separate how to customize the default report and building your own reports through the API in the documentation?
Comments
Comment #1
grendzy CreditAttribution: grendzy commentedIf you want to make more than superficial changes to the built-in reports, then you'll want to write your own using the API.
Regarding the examples, try adding
To the end of the code snippet; that worked for me on a PHP page. This should probably be fixed in the docs.
If you are using only custom reports, you can disable google_analytics_reports sub-module, and just leave the google_analytics_api module enabled.
Comment #2
SWMdave CreditAttribution: SWMdave commentedAny samples or documentation on how to implement a custom report into a new block or node?
Comment #3
grendzy CreditAttribution: grendzy commentedFor information on integrating report output with blocks, check out
http://drupal.org/project/examples (block_example)
and
http://drupal.org/node/206758
For nodes you could use hook_view (to modify the node's display), or hook_menu (to declare a tab, a.k.a local task). So far node-specific integrations have been avoided because so many pages are not nodes, and I think it would confuse users when the report disappeared on a views / panels page.