Difference between revisions of "What's the best way to track a Conversion Action and redirect?"

From Market Ruler Help
Jump to: navigation, search
(Created page with '= 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 cont…')
(No difference)

Revision as of 19:26, 8 October 2009

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.

First, you'll need to determine how your server performs a redirect:

Using JavaScript

In this case, your web page contains 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.

Redirecting using the web server

If your web server is issuing a HTTP Redirect to the browser, your options are more limited, but you can accomplish something similar using the above method prior to the HTTP Redirect.

However, if the HTTP Redirect comes directly after a form submission, it may not work.

In these cases, it is best to contact MarketRuler Support.