Opened 2 years ago

Closed 2 years ago

Last modified 14 months ago

#2731 closed Bug (fixed)

Disable mailto:tracking

Reported by: matt Owned by:
Priority: normal Milestone: 1.7 Piwik 1.7
Component: Core Keywords:
Cc: Sensitive: no


mailto: links are tracked with Piwik. However as of 1.6 we do not track any URL that does not start with http. Therefore the mailto clicks are not tracked anymore. We should instead disable completely and not fire a request.

Users can manually track the mailto: links by doing:

<a href="" onClick="javascript:piwikTracker.trackLink('http://mailto/mailto/Agent namexyz', 'link');"></a>

Change History (2)

comment:1 Changed 2 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [5356]) Fixes #2731

comment:2 Changed 14 months ago by adrian

To automatically track mailto links, use jQuery and this code

<!--Track mailto-->
jQuery(document).ready(function($) {
	piwikTracker.setCustomVariable(1, "Share By Email",  'Email='+this.href.replace(/^mailto:/i,'') + ' /Page = ' +  location.href, "page");  piwikTracker.trackPageView();
<!--End Track mailto-->

more details:

Note: See TracTickets for help on using tickets.