Configure your PayPal IPN script to notify ConversionRuler

From Market Ruler Help
Revision as of 17:09, 23 July 2012 by Admin (talk | contribs)
Jump to: navigation, search

If your cart already supports PayPal IPN then you'll need to customize your script to communicate directly with ConversionRuler using the custom parameter passed in originally.

An example, written in PHP to track order amounts and order numbers is:

<?php
/* This is your custom IPN processing file */
... regular IPN tracking ...
$custom = isset($_REQUEST['custom']) ? $_REQUEST['custom'] : null;
if ($custom) {
    $custom .= "&cramount0=" . urlencode($_REQUEST['mc_gross']);
    $custom .= "&crtext0=" . urlencode($_REQUEST['txn_id']);
    file_get_contents("https://www.conversionruler.com/bin/tracker.php?" + $custom);
}

Note the URL used to notify ConversionRuler is:

https://www.conversionruler.com/bin/tracker.php

Which takes a few query string parameters:

  • crsite - The Site ID to track (You may also use the name siteid) Required.
  • crcookie - The user's identification. Required. In this case, it's required, but normally it's passed by the browser and is not required.
  • craction - The action code to record. Optional.
  • cramount0 - The order amount. Optional.
  • crtext0 - The order number. Optional.

Note that you must properly URL-encode any values you pass to this script.