Help, Google analytics OnClick code conflicts with SB! see code example.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Help, Google analytics OnClick code conflicts with SB! see code example.

eTard
I have code like this for SB that works perfect to pop a video and play it...

a href="mykillervideo.mp4" title="Awesomeness Video" rel="shadowbox;width=325;height=240"

now, we want to track how often these awesome videos get played. To do this in Google Analytics you use an OnClick code piece like this...

onclick="recordOutboundLink(this, 'Killer Videos', 'mykillervideo.mp4');return false;"

so each piece of code works perfect on it's own, but if you combine them in 1 link like this.. SB will trigger and at the last second the video will pop out of the SB and just play in a separate page that opens!

a href="mykillervideo.mp4" title="Awesomeness Video" rel="shadowbox;width=325;height=240" onClick="recordOutboundLink(this, 'Killer Videos', 'mykillervideo.mp4');return false;"

is there anyway to get this code piece above to play nice with SB so I can both correctly open videos in the SB and track the clicks?
Reply | Threaded
Open this post in threaded view
|

Re: Help, Google analytics OnClick code conflicts with SB! see code example.

eTard
bump....

no thoughts?
Reply | Threaded
Open this post in threaded view
|

Re: Help, Google analytics OnClick code conflicts with SB! see code example.

Sebastian
The same problem here. Does anyone has any ideas?

Cheers.
Reply | Threaded
Open this post in threaded view
|

Re: Help, Google analytics OnClick code conflicts with SB! see code example.

dataload
Can't you just move the onclick handler into the onopen callback mentioned in the shadowbox options?
Reply | Threaded
Open this post in threaded view
|

Re: Help, Google analytics OnClick code conflicts with SB! see code example.

eTard
can you expand on that please? they dont show an example and I am not familiar with an "onopen" call as they dont explain it so I am not sure how to implement it and keep the GA code intact.