Difference between revisions of "Configure your PayPal IPN script to notify ConversionRuler"

From Market Ruler Help
Jump to: navigation, search
 
Line 26: Line 26:
  
 
Note that you must properly URL-encode any values you pass to this script.
 
Note that you must properly URL-encode any values you pass to this script.
 +
 +
== Related ==
 +
* Main article: [[Integrating PayPal Commerce Tracking]]
 +
* [[Configure PayPal to use ConversionRuler's IPN Gateway]]
 +
 +
[[Category:ConversionRuler]]
 +
[[Category:ConversionRuler Cart Installation]]
 +
[[Category:ConversionRuler Tracking]]

Latest revision as of 17:11, 23 July 2012

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.

Related