AdWords
2.6K members online now
2.6K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

How to add tracking code to an email link?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I was given the code below to add to an email link, but Im not sure how to. Does anyone have any suggestions, or maybe know of a better place to look? Thank you for any info:

<a href="mailto:example@email.com"><b><span style="color: red;">example@email.com</span></b></a></p>

<!-- Google Code for Referral Form Conversion Page

In your html page, add the snippet and call

goog_report_conversion when someone clicks on the

chosen link or button. -->

<script type="text/javascript">

  /* <![CDATA[ */

  goog_snippet_vars = function() {

    var w = window;

    w.google_conversion_id = 951294078;

    w.google_conversion_label = "b4qUCJSasW0Q_rDOxQM";

    w.google_remarketing_only = false;

  }

  // DO NOT CHANGE THE CODE BELOW.

  goog_report_conversion = function(url) {

    goog_snippet_vars();

    window.google_conversion_format = "3";

    var opt = new Object();

    opt.onload_callback = function() {

    if (typeof(url) != 'undefined') {

      window.location = url;

    }

  }

 var conv_handler = window['google_trackConversion'];

  if (typeof(conv_handler) == 'function') {

    conv_handler(opt);

  }

}

/* ]]> */

</script>

<script type="text/javascript"

  src="//www.googleadservices.com/pagead/conversion_async.js">

</script>

1 Expert replyverified_user

How to add tracking code to an email link?

Top Contributor
# 2
Top Contributor

Hi Chris L,

Assuming you wish to record a conversion when someone click on the link:

 

<a href="mailto:example@email.com" onclick="goog_report_conversion(this.href);"><b><span style="color: red;">example@email.com</span></b></a></p>

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords