Support » Plugin: URL Params » Capturing an affiliate id

  • Hi,

    I would like to use your plugin to capture the affiliate id in the URL from an affiliates site.

    The landing page has a form but we want to save the affiliate id just in case the user navigates around the site and them comes back to complete the form later in the session (when the affiliate id will be lost in the url).

    Is it possible to ‘save’ the affiliate id somewhere and look it up to add to the form latter during the session ?



Viewing 1 replies (of 1 total)
  • You would set the value affid=1234 from the URL as a session variable, so that it persists while the user browses around the site.

    You can find this solution with a little searching, there are quite a few people discussion it on stackoverflow for example, but if you don’t know what to look for it can be hidden in plain sight.

    Warning: You will have to edit your php, and understand more than just using plugins.

    Hope it helps:
    $lead = $_GET[‘lead’]; $_SESSION[‘lead’] = $lead;
    $url = parse_url(get_bloginfo(‘url’));
    setcookie(“lead”, $lead, 0, $url[‘path’], $url[‘host’]); (set)
    To test:
    echo ($_COOKIE[‘lead’]); // Lead Cookie

Viewing 1 replies (of 1 total)
  • The topic ‘Capturing an affiliate id’ is closed to new replies.