What's the best way to track a Conversion Action and redirect?

From Market Ruler Help
Jump to: navigation, search
This article is for tracking Conversion Actions. To track landings related to a Redirect, see Landing page does an automatic redirect.

Symptoms

  • Circumstances of a web site require a redirect page prior to visiting another site, or downloading a PDF
  • You want to send visitors to one domain in your control before redirecting them to another not in your control

Solution

Redirecting on an Interstitial Page is done using JavaScript. To embed ConversionRuler Snippets on an interstitial page, it is best to use at least a half-second delay.

The primary reason with this is for Web Browser compatibility. Some issues arise when using Apple Safari, and Mozilla FireFox and when downloading PDF or other Binary files.

Your web page should contain code which looks similar to this:

<!-- ConversionRuler snippet goes here -->

<script type="text/javascript">
document.location = "http://www.example.com/downloads/proposal.pdf"
</script>

To update this JavaScript to work properly with our Tracking Snippet, we need to add a delay to the redirect:

<!-- ConversionRuler snippet goes here -->

<script type="text/javascript">
function redirect_go()
{
    document.location = "http://www.example.com/downloads/proposal.pdf"
}
setTimeout(redirect_go, 500);
</script>

In the above code, the 500 number is the number of milliseconds to delay before performing the redirect, which is a half-second.