WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics for WordPress
tracking mailto: (1 post)

  1. thomask
    Member
    Posted 3 years ago #

    I miss one feature - tracking of mailto links. I guess it will be something like this but i would prefer if you would add it to your code

    // If the link is mailto:
    	 	if ( href.match(/^mailto:/) )  {
    	    	// Add the tracking code
    			a.click(function() {
    				if ( analyticsEventTracking == 'enabled' ) {
    					_gaq.push(['_trackEvent', 'Mailto', href.match(/:\/\/(.[^/]+)/)[1], href]);
    				} else
    					_gaq.push(['_trackPageview', analyticsMailtoPrefix + url]);
    			});
    		}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic