
Originally Posted by
dsvb
Thanks for a great plugin. My client wants the referrers to land on an other page then the homepage. Is it possible to change the URL of the page for all referrals? I've been through most of the php but can't find it. I know i can change it with the deeplink generator but my clients expects a vast amount of affiliates so preffers it automated.
Are you saying that you want a different landing page if the page access was made with the referrer parameter set? If so, you could make your modification to /includes/init_includes/init_snap.php to perform your custom redirect.
Code:
<?php
/*-----
** Initialize the session's referrer key.
*/
//-bof-v2.1.2a
if (!defined('SNAP_COOKIE_LIFETIME')) {
define ('SNAP_COOKIE_LIFETIME', 60*60*24*365);
}
//-eof-v2.1.2a
if( isset($_GET['referrer']) ) {
if( strpos($_GET['referrer'], SNAP_KEY_PREFIX) === 0 ) {
if( strlen($_GET['referrer']) < 24 ) {
$_SESSION['referrer_key'] = $_GET['referrer'];
setcookie("referrer_key", $_GET['referrer'], time() + SNAP_COOKIE_LIFETIME, "/"); /*v2.1.2c*/
//- Insert your custom redirect here
}
}
} else if( $_COOKIE['referrer_key'] ) {
if( strpos($_COOKIE['referrer_key'], SNAP_KEY_PREFIX) === 0 ) {
if( strlen($_COOKIE['referrer_key']) < 24 ) {
$_SESSION['referrer_key'] = $_COOKIE['referrer_key'];
}
}
}
Bookmarks