Link tracking in safari


(latompa) #1

Running piwik 0.4.3.
I can’t get link tracking to work in Safari (4.0.3) on the mac.

piwikTracker.enableLinkTracking();

Loading the same page(s) on firefox, I get piwik requests when I click on outbound links.
However, in Safari, I don’t see any requests back to my piwik server.

Ironically, if I use the safari JS debugger and manually step through the clickHandler code, I do see a request being sent to piwik.

Anyone else with this problem?
Tom


(vipsoft) #2

I didn’t have a Mac to test it on, but link tracking worked with Safari on XP and Mobile Safari on the iPhone.


(Atika) #3

Hello,

I have the same problem, when your click on a link, the handler work, the image get the correct source, but nothing is returned by Safari and nothing happens.
I wanted to know how persons download my files on my new blog, and it’s don’t work with Safari (webkit) users.

I create a test page, when i add an alert(""); at the end of the image function… it work ! (why ? it’s block the routine ?)

I see a page to a problem with the unload/beforeunload function, but the test work for me.

I have no more knowledge to debug this script and find an solution to this… style_emoticons/<#EMO_DIR#>/sad.gif

I am not developper and an French user.


(numick) #4

Hello all,

I have the same problem in tracking links with Safari. No problem with others browser. I also used specific class to force the tracking of downloads…but it did not work.

My configuration: OS: Snow Leopard - Browser: Safari 4.0.5.


(vipsoft) #5

If you have multiple click handlers (of which Piwik is one), a common problem is that web devs “return false” in their own click handler. In some browsers, this means: cancel the event, do not bubble/propagate the event further. The order that click handlers fire is indeterminate. If your click handler fires before Piwik, and your click handler returns false, then Piwik’s click handler doesn’t run. This usually isn’t what you want. The cross-browser recommendation is to not return anything at all.