preload

Passing Variables Through Prosper 202 Mod

Posted by ctrtard on Aug 03, 2010

The Issue:

A new campaign I am about to run requires me to pass a zip code as a get variable in the url. For example:

http://offerpage.com?id=666&zip=12345

This is also known as a pre-pop, as in “pre-populating” an offer.

The Problem:

So my landing page is all set up.  I have a form on there that let’s the user enter his zip code and I have my Prosper202 javascript tracking code in place.   Everything’s great until I have to actually pass that zip code through Prosper and then to my offer page.

When you “Get LP Code” in Prosper202, you get outbound links like this:

$tracking202outbound = ‘http://yourProsperDomain/tracking202/redirect/off.php?acip=123&pci=’.$_COOKIE['tracking202pci'];

Even if you modify this URL, any additional variables you add will get ignored and lost during the redirection process.

The Solution:

There are a few ways to fix this, one of them is by using cookies.  I haven’t test this solution here, but it looks like it would work. However, it would not allow you to use Prosper202′s cloaking feature. That kind of sucks :-(

My fix is a hack.  You will need to edit one file in your Prosper202 install.  But once you’ve done the mod, it will allow you to pass any variables you want in a simple, elegant way.  No need for multiple files, cookies, or other bullshit that I will never remember to do. ;-)

The Mod:

Edit: tracking202/redirect/off.php

Change 1/3:
Add the following code directly below the open php tag, like so:

1
2
3
4
5
6
7
8
9
10
11
12
<? 
/* Get Variable Pass-thru Mod, by Mark -- http://ctrtard.com -- added 8-3-2010
This mod will allow you to pass additional variables to the P202 redirect. E.g.
$tracking202outbound = 'http://your202.com/tracking202/redirect/off.php?acip=123&pci='.$_COOKIE['tracking202pci'] . '&zip=10010';
*/
foreach($_GET as $key => $value) {
    if ($key !== "acip" AND $key !== "pci")
    $stack .= "&$key=" . urlencode($value);
}
/* End Get Variable Pass-thru Mod */
 
#only allow numeric acip's

Change 2/3:

Add the following code on line 98. Directly below the line that reads: “$redirect_site_url = replaceTrackerPlaceholders($redirect_site_url,$click_id);”

96
97
98
99
100
    $redirect_site_url = replaceTrackerPlaceholders($redirect_site_url,$click_id);
 
    /* Get Variable Pass-thru Mod */
    $redirect_site_url .= $stack;
    /* End Variable Pass-thru Mod */

Change 3/3:

Add the following code on line 373. Directly below the comment that reads: “//NOW LETS REDIRECT”

371
372
373
374
375
//NOW LETS REDIRECT  
 
/* Get Variable Pass-thru Mod */
$redirect_site_url .= $stack;
/* End Variable Pass-thru Mod */

Note, line numbers for the off.php file are from Prosper 1.5.1. If you have a different version, the line numbers might be in slightly different places.

Usage:

Once the mod is in place, passing any variable you need to is simple and elegant.  All you need to do is append it.  Here is a chunk of code to show how this can be done. We will pass a zip and color variable:

1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
$color = "red";
$zip = "12345"; 
 
// paste our outbound link Prosper gave us in "Get LP Code"
$tracking202outbound = 'http://yourProsperDomain/tracking202/redirect/off.php?acip=123&pci='.$_COOKIE['tracking202pci']; 
 
// now let's append our variables
$tracking202outbound .= "&zip=$zip&color=$color";
 
// make a link
echo "<a href=\"$tracking202outbound\">click here</a>";
?>

Assuming our offer link was “http://offerpage.com?id=666″, the user would be redirected to:

http://offerpage.com?id=666&zip=12345&color=red

Yay!

Please comment and ReTweet if you found this useful.

0saves
If you enjoyed this post, it's easy to thank me! Share it using a button on the left, leave a comment or subscribe to my RSS feed. Thanks!

Related posts:

  1. Split Testing and Rotating Offers in Tracking202
  2. Custom Start Page for Prosper 202 Mod
  3. Pimp Your Prosper with Subid Injection Buttons
  4. Split Testing and Landing Page Rotation Script for PPV
  5. Prosper 202 1.7 Release and Chart disable Mod

Tags: , , , , ,
  • Trackbacks

  • Trackback from1st shot at fan club study... - CPV Den Members Forum
    Monday, 17 January, 2011

    [...] banging my head on the wall trying to figure out the tracking. Eventually Google helped me out: Passing Variables Through Prosper 202 Mod | CTRtard.com – Internet Marketing with a Helmet Got the whole process all setup from start to finish and all nicely tracking. Lucas, could I PM [...]

  • Leave a Comment

    * Required
    ** Your Email is never shared
    *

    CommentLuv badge