Header Triggers

HTTP request and response Headers include metadata about the communication such as the referring URL, host, date, location, and more. SiteSpect's Header Triggers allow you to specify a Header to use as a matching device. SiteSpect allows you to compare the Header Triggers that you define to the Header in both the request and response.

To create a Header Trigger:

  1. Select Header as the type of Trigger.
  2. Select the Header Name you want to use. Choose from among the list of common Headers. The items in the list are only suggestions. SiteSpect can match any Header present in the request or response. If the Header Name you want to use is not on the list, enter a custom name.

    Note: If you are creating a Trigger on the Metric page, there are several options that help further specify the Name. Select from among Contains, Starts With, Ends With, Exactly, and Regex.
  3. Enter the Value you want to match.

SiteSpect allows you to match using Custom Headers as well as the following common HTTP Headers:

  • Referrer
  • Cookie
  • Set-Cookie
  • User-Agent
  • Host
  • Content-Type
  • Accept-Language
  • Content-Language
  • Date
  • Location

In addition, SiteSpect allows you to match other metadata. The following choices are also available:

PROTOCOL: The protocol is HTTPS if the response is sent over SSL and HTTP if it is not.

METHOD: The method is the operation being requested. The method is usually GET when the user clicks on links; the method is POST when the user submits most HTML forms.

RESPONSE CODE: The response code is the status of the response from the web server.

  • 200 OK signifies a normal successful response.
  • 301 Moved Permanently signifies a permanent redirect.
  • 302 Found signifies a temporary redirect respectively.


The following are a few examples of how you may want to use Header Triggers.

Set Cookie Example

To match a response in which the website sets the account cookie:

  1. Select the Header Trigger.
  2. Select Set-Cookie as the Header Name.
  3. Metrics only: Select a qualifier at the beginning of the Value field.
  4. Enter the name of the Cookie in the Value field to the right.

To match when a Header is optional, prefix the Header with a question-mark (?); the match succeeds if either the header is not present at all or it is present and the Header Value also matches.

Note: This is not Regular Expression syntax. SiteSpect supports this option only in certain fields.

URL and Cookie Example

To match when a visitor views the cart page (/cart.asp) without an account cookie:

  1. Select URL from the Triggers drop-down.
  2. Metrics only: Use cart.asp as the URL. Other components: Enter ^/cart\.asp as the URL.
  3. Add a Header Trigger.
  4. Metrics only: Make the Header Trigger a Cookie Trigger. Other components: Enter ^Cookie$ as the Header Name.
  5. Metrics only: Select Regex as the qualifier. All components: Enter ^(.(?<!\baccount=.))*$ as the Header Value.

Matching Options

Header Triggers allow the following matching options:

  • Contains
  • Does not contain
  • Starts with
  • Does not start with
  • Ends with
  • Does not end with
  • Exactly
  • Does not match exactly
  • Regex
  • Does not match regex