Name

SourcePriority — specify list of CGI variables to check for source (affiliate) name

SYNOPSIS

CGI_variable...

DESCRIPTION

The directive specifies a prioritized list of CGI variables to check when looking for the source (affiliate) name. The first name found is used.

The directive also accepts the following special values:

  • mv_pc — try reading affiliate name from the existing mv_pc variable, but don't interfere with mv_pc's special values (value "RESET" or values containing only digits).

  • cookie-NAME — check the cookie with label NAME.

  • session — stop processing if a session for a visitor already exists. This setting is useful for sending affiliate traffic to other sites but preventing them from getting credit for sales made by customers following their banner back to your site.

  • session-NAME — stop processing if NAME session variable is set.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Read affiliate name from CGI variable and cookie

SourcePriority mv_source cookie-MV_SOURCE

Example: Read affiliate name from "mv_pc", CGI variable and cookie

SourcePriority mv_pc mv_source cookie-MV_SOURCE

Example: Read affiliate name from CGI variable "affid"

SourcePriority affid

Example: Ignore source name for visitors returning back to your site

Use "session" to prevent affiliate sites from getting credit for sales when a customer follows a banner back to your site:

SourcePriority session mv_pc mv_source

Example: Special treatment for affiliates using variable "specialsource"

Make affiliates who use CGI variable specialsource instead of mv_source get special treatment by overriding the "sessions" check:

SourcePriority specialsource session mv_pc mv_source

Example: Setting SourcePriority

Allow affiliates to get credit from redirecting customers back to your site (there is already a session), but only if no other affiliate is already set:

SourcePriority session-source mv_pc mv_source

NOTES

AVAILABILITY

SourcePriority is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 730

['SourcePriority', 'array_complete', 'mv_pc mv_source'],

Source: lib/Vend/Config.pm
Line 3838 (context shows lines 3838-3851)

sub parse_array_complete {
my($item,$settings) = @_;
return '' unless $settings;
my(@setting) = grep /\S/, split /[\s,]+/, $settings;

my $c = [];

for (@setting) {
  check_legal($item, $_);
  push @{$c}, $_;
}

$c;
}

AUTHORS

Peter Ajamian

SEE ALSO

DocBook! Interchange!