You are here:  » Click Ref

Active Forum Topics


Click Ref

Submitted by robah on Sat, 2014-06-07 15:28 in

Hi David

I've been trying to find the easiest way to include &clickref.

I've read other forum posts but they seem to deal with just one network.

I use several networks - webgains - aw - td - cj - independent

I tried the jump.php mod, but it is only for one network

The Global filter would change all urls for all networks

Is there an easy way to add click ref to the buy urls for multiple networks?

scratching my head ...

Kind regards

Rob

Submitted by support on Sat, 2014-06-07 16:01

Hello Rob,

A custom tracking parameter, as networks all use slightly different versions on a name (e.g. clickref for Affiliate Window) would normally be added as a per feed Text After filter on the Buy URL field.

For example, after registering an Affiliate Window feed, click Filters alongside the filename and add a new "Text After" filter to the Buy URL field. In the text box on the configuration page for the filter, enter the additional parameter and value as required e.g.

&clickref=mysite

Hope this helps! Let me know of course if you're still not sure;

Cheers,
David.
--
PriceTapestry.com

Submitted by robah on Sat, 2014-06-07 21:47

Thanks David, that makes perfect sense now

Rob

Submitted by sirmanu on Tue, 2020-06-02 22:42

Hi David. I want to use filter "text after", but the problem is, that sometimes the URL has the ?, so you must use &, however, sometimes, the question mark is not present, so the text after must start with ?.

How can I solve this? Is any filter available for this??
Thank you!

Submitted by support on Wed, 2020-06-03 06:43

Hi,

Sure - add the following code to includes/filter.php to add a new URL Parameter filter to achieve this;

  /*************************************************/
  /* URLParam */
  /*************************************************/
  $filter_names["URLParam"] = "URL Parameter";
  function filter_URLParamConfigure($filter_data)
  {
    widget_textBox("Name","name",TRUE,$filter_data["name"],"",3);
    widget_textBox("Value","value",TRUE,$filter_data["value"],"",3);
  }
  function filter_URLParamValidate($filter_data)
  {
    if ($filter_data["name"]=="")
    {
      widget_errorSet("name","required field");
    }
    if ($filter_data["value"]=="")
    {
      widget_errorSet("value","required field");
    }
  }
  function filter_URLParamExec($filter_data,$text)
  {
    $parts = parse_url($text);
    $text .= (isset($parts["query"])?"&":"?").$filter_data["name"]."=".$filter_data["value"];
    return $text;
  }

For the configuration, enter "clickref" (without the quotes) as the name, and the required value in the second box. The filter uses parse_url to check for the presence of the query part of the URL (after the ?), and appends the new parameter using ? or & as required...

Cheers,
David.
--
PriceTapestry.com

Submitted by sirmanu on Wed, 2020-06-03 07:04

Awesome David, thank you very much for your fast response.

It is working as expected without errors!

Have a nice day!