[Plugin: WP SlimStat] Any way to allow a PDF download to open in new window and get tracked?
-
First, thanks for the great plugin!
I am having trouble tracking PDF downloads that open in a new window being tracked.
This code DOES NOT allow the file to open in a new window. It opens the PDF in the same window and the hit gets tracked.
<a href="/path/to/my/download.pdf" target="_blank" onclick="ss_te(event,1,true)">Download file</a>
If I remove the “true” parameter, the PDF DOES open in a new window properly, but IS NOT tracked by SlimStat.
<a href="/path/to/my/download.pdf" target="_blank" onclick="ss_te(event,1)">Download file</a>
Is there any way to allow a PDF download to open in new window and get tracked in SlimStat?
Separate question:
Also wondering if tracking can be triggered using “oncontextmenu” or “onmouseup” to track right clicks and middle clicks in case a user is using one of these methods for downloading a PDF instead of standard clicking. Example below does not seem to work, but you will see what I am aiming for.Something like this perhaps to track standard click and right clicks and onmouseup?
<a href="/path/to/my/download.pdf" target="_blank" onclick="ss_te(event,1)" oncontextmenu="ss_te(event,2)" onmouseup="ss_te(event,3)">Download file</a>
Any help would be greatly appreciated.
Regards,
SDesign
- The topic ‘[Plugin: WP SlimStat] Any way to allow a PDF download to open in new window and get tracked?’ is closed to new replies.