Download & Extend

Problem with tracking external links

Project:Google Analytics
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review

Issue Summary

Hi

I use highslide library on my site to display images in the overlay and internally they use links in the following format to allow user to zoom in into the image:

<a class="highslide-full-expand" href="javascript:hs.expanders[0].doFullExpand();" title="Zoom In" style="display: block;"></a>

By looking at the googleanalytics.js file I figured that this link will be treated as external link, even though it's not and will screw reports on google analytics side by storing javascript:hs.expanders[0].doFullExpand(); as the name of the link.

I will attach the patch with additional check before firing _trackEvent for external links. I hope you will consider it or provide better approach.

Thanks a lot!

Comments

#1

Patch is attached.

AttachmentSizeStatusTest resultOperations
external_links_1425358.patch689 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch external_links_1425358.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#2

Status:active» needs work

I've seen this myself to with colorbox... But https? Is not ok as it could also be ftp and others.

#3

What about this one? It should match most common protocols, but skip those like javascript:bla

AttachmentSizeStatusTest resultOperations
external_links_1425358_3.patch693 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch external_links_1425358_3.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.View details | Re-test

#4

Version:6.x-3.x-dev» 7.x-1.x-dev
Status:needs work» needs review

#5

Status:needs review» needs work

The last submitted patch, external_links_1425358_3.patch, failed testing.

#6

Ok, here is the patch for D7 and previous one from #3 was for D6, that's why it failed last time.

AttachmentSizeStatusTest resultOperations
external_links_1425358_6.patch645 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 157 pass(es).View details | Re-test

#7

Status:needs work» needs review

You always need to change the issue status

#8

Priority:normal» critical

Required for next release