I think it would be much easier to implement other modules that used the Drupal google Analytics module as a base if the information sent to GA could be more easily manipulated. Example, there is a couple of long issues about search modules where existing search modules cannot implement anything without duplication of page sends.

With that said, I started this off with a simple alter hook_googleanalytics_page_url_alter that allows you to alter $url_custom so that you can send what ever URL you want. In this case, other modules could allow you for example, to set the "search" query parameter or even add categories.

Comments

generalredneck created an issue. See original summary.

generalredneck’s picture

Status: Active » Needs review
StatusFileSize
new407 bytes
hass’s picture

Status: Needs review » Closed (duplicate)
Parent issue: » #231451: Add hook to alter data before sending it to browser