Send node id to Google Analytics when using the automatic rewrite module
Ruudjuh - September 4, 2009 - 13:56
| Project: | Google Analytics |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Description
To support our needs I created a patch that adds a option to send the node id in the page tracker URL.
We need this id in the pagepath in google analytics to map a page to data in an external program. This id is added as /example/url(node=1) and send in the _trackPageview function by editing the $custom_url variable. This option can be set in the admin page by the advanced settings. Can you please add this to the module so many of our users can use this plugin in Drupal.
| Attachment | Size |
|---|---|
| google_analytics-sendnode.patch | 2.51 KB |

#1
This uggly non-core trustworthy code will never go into this module. The use of REQUEST_URI is prone to XSS exploits and does not work on IIS. And finally I do not see the use case + you may use Event Tracking to archive this.
#2
Aside, see http://drupal.org/node/284599 and #231451: Add hook_google_analytics for other modules, please.