![]() |
| > Home > Documentation > Latest documentation > Local config directives > SourceCookie |
|
SourceCookieSpecify a cookie to set for affiliates (source session variable). Synopsis
Scope
This directive is only available for use in the local
(catalog.cfg) configuration file.
It will not affect any other website in any way.
This directive will not work in the global
(interchange.cfg) configuration file.
Description
This directive allows you to automatically set a cookie when a user enters the site via an affiliate (source). Setting SourceCookie defines the relevant attributes of a cookie to be maintained in conjunction with the usual session-only parameter $Session->{source}. Its usage eliminates the duration of the user's session as the limiting factor for applying credit to a referrer. SourceCookie and SourcePriority would be expected to typically work in tandem, and thus the same cookie defined in both contexts. However, there is no such requirement to do so. Defining SourceCookie by itself merely makes the cookie available any time the core source routines set or manipulate $Session->{source}. That cookie may, or may not, be used as an element in SourcePriority, which itself may look to a cookie not maintained by this SourceCookie directive. ParametersnameThis is the name of the cookie. The same name must be used when reading the cookie later, with SourcePriority, or whatever. expireSession cookies are only valid during a browser session, and are automatically rendered invalid (usually deleted) as soon as the user closes the browser. Persistent cookies outlive browser sessions, but cannot live forever. If you want your cookie to be persistent then you must specify an expiration date. You may set a persistent cookie's expiration date using either of the following two methods: Absolute date/timeYou may specify any future date/time using the following format:
Relative date/time offsetYou may specify an expiration date/time in terms of an offset from the current date and time. The date must take the form of a number, followed by one of "seconds", "minutes", "hours", "days" or "weeks". For example: "7 days", " 4 weeks" or "60 minutes" etc. domainThe (space separated) value(s) you specify, using this parameter, will override the default domain(s), listed using the CookieDomain local configuration directive. You might want to set this if you need to access the cookie from outside of the Interchange-driven website, but it is usually better to use the CookieDomain directive instead. The default is to use your website's domain or all of the values declared using the CookieDomain local configuration directive. pathThe (space separated) value(s) you specify, using this parameter, will override the default URI path(s) configured using the Catalog global configuration directive. secureWhen set true the cookie will have the secure flag set. This instructs the browser to only send the cookie with requests for secure (HTTPS/SSL) pages. autoresetautoreset is a boolean that, when set true, will cause each request from the client to reset the cookie in the response, effectively refreshing the expiration time relative to the current time. Uses, for example, might include a desire to ensure that the source cookie last "forever" (autoreset + sufficiently long expire period) or for more obscure uses such as "Affiliate should last [value of expire] from the last request."
|
| Home | Legal nonsense | Privacy policy | Contact us |