Difference between revisions of "How do I set up link tracking?"

From Market Ruler Help
Jump to: navigation, search
m
 
Line 5: Line 5:
 
  <nowiki><a href="download.pdf">Download our brochure</a></nowiki>
 
  <nowiki><a href="download.pdf">Download our brochure</a></nowiki>
  
You will modify this using the [[Code Generator]] ([http://conversion.marketruler.com/setup/codegen.php link]) (preferably), then adding the [[cr_link]] call to it:
+
You will modify this using the [[Code Generator]] ([http://conversion.marketruler.com/setup/codegen.php link]) (preferably), then adding the [[__CR.link]] call to it:
  
  <nowiki><a href="download.pdf" onclick="return (typeof cr_link != 'undefined') ? cr_link(this, 5) : true">Download our brochure</a></nowiki>
+
  <nowiki><a href="download.pdf" onclick="return window.__CR ? __CR.link(this, 5) : true">Download our brochure</a></nowiki>
  
 
Different [[Conversion Actions]] will have a different [[Action Code]] in the link (in this case, '''5''').
 
Different [[Conversion Actions]] will have a different [[Action Code]] in the link (in this case, '''5''').
Line 13: Line 13:
 
For links which '''already have an [[onclick]] attribute''' in them, it requires some additional programming, but you can usually append the code with ours:
 
For links which '''already have an [[onclick]] attribute''' in them, it requires some additional programming, but you can usually append the code with ours:
  
  <nowiki><a href="download.pdf" onclick="genPDFanim(); return (typeof cr_link != 'undefined') ? cr_link(this, 5) : true">Download our brochure</a></nowiki>
+
  <nowiki><a href="download.pdf" onclick="genPDFanim(); return window.__CR ? __CR.link(this, 5) : true">Download our brochure</a></nowiki>
  
 
Since this delves into the more technical realm, please contact [[MarketRuler Support]] if you have any questions.
 
Since this delves into the more technical realm, please contact [[MarketRuler Support]] if you have any questions.

Latest revision as of 15:49, 26 February 2016

Link tracking works by adding a onclick handler to your link tags.

Your link on your page appears something like this:

<a href="download.pdf">Download our brochure</a>

You will modify this using the Code Generator (link) (preferably), then adding the __CR.link call to it:

<a href="download.pdf" onclick="return window.__CR ? __CR.link(this, 5) : true">Download our brochure</a>

Different Conversion Actions will have a different Action Code in the link (in this case, 5).

For links which already have an onclick attribute in them, it requires some additional programming, but you can usually append the code with ours:

<a href="download.pdf" onclick="genPDFanim(); return window.__CR ? __CR.link(this, 5) : true">Download our brochure</a>

Since this delves into the more technical realm, please contact MarketRuler Support if you have any questions.