---
title: Header Triggers
description: 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 a
---

[Skip to content](https://doc.sitespect.com/knowledge/header-triggers#main-content)

English

Show submenu for translations

![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=340&height=49&name=Monetate-Logo-Full-Color-1.png)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

Open main navigation

Close main navigation

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)
- English
  
  Show submenu for translations

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://doc.sitespect.com/knowledge?hsLang=en)
2. [Build](https://doc.sitespect.com/knowledge/build?hsLang=en)
3. [Triggers](https://doc.sitespect.com/knowledge/build?hsLang=en#triggers)

# 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** from the trigger options.   
   In SuperFresh, this is found in the server-side trigger section, under "Build custom trigger".
2. Select the Header Name you want to use. Choose from 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 Equals/Exactly match, Contains, Starts with, Ends with, Regex, and others.
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.

### Example

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](https://sitespect.force.com/onlinehelp/s/article/About-Regular-Expressions-1459718276%20target=) 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:

- Exactly ("Equals" in SuperFresh)
- Does not match exactly ("Doesn't equal" in SuperFresh)
- Contains
- Does not contain
- Starts with
- Does not start with
- Ends with
- Does not end with
- Regex
- Does not match regex

- [Get Started](https://doc.sitespect.com/knowledge/get-started?hsLang=en#main-content)

    - [SiteSpect Support](https://doc.sitespect.com/knowledge/get-started?hsLang=en#sitespect-support)
    - [Overview Information](https://doc.sitespect.com/knowledge/get-started?hsLang=en#overview-information)
    - [Intro to SiteSpect](https://doc.sitespect.com/knowledge/get-started?hsLang=en#intro-to-sitespect)
    - [Account Setup](https://doc.sitespect.com/knowledge/get-started?hsLang=en#account-setup)
    - [Artificial Intelligence](https://doc.sitespect.com/knowledge/get-started?hsLang=en#artificial-intelligence)
- [Dashboard](https://doc.sitespect.com/knowledge/dashboard?hsLang=en)
- [Build](https://doc.sitespect.com/knowledge/build?hsLang=en#main-content)

    - [Setting Up a Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#setting-up-a-campaign)
    - [Create a Client-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-client-side-campaign)
    - [Create a Server-Side Campaign](https://doc.sitespect.com/knowledge/build?hsLang=en#create-a-server-side-campaign)
    - [Metrics](https://doc.sitespect.com/knowledge/build?hsLang=en#metrics)
    - [Audiences](https://doc.sitespect.com/knowledge/build?hsLang=en#audiences)
    - [Triggers](https://doc.sitespect.com/knowledge/build?hsLang=en#triggers)
    - [Variations](https://doc.sitespect.com/knowledge/build?hsLang=en#variations)
    - [Traffic Management](https://doc.sitespect.com/knowledge/build?hsLang=en#traffic-management)
    - [Preview](https://doc.sitespect.com/knowledge/build?hsLang=en#preview)
    - [Factors](https://doc.sitespect.com/knowledge/build?hsLang=en#factors)
    - [Advanced Settings](https://doc.sitespect.com/knowledge/build?hsLang=en#advanced-settings)
    - [Omnichannel](https://doc.sitespect.com/knowledge/build?hsLang=en#omnichannel)
    - [Regular Expressions (Regex)](https://doc.sitespect.com/knowledge/build?hsLang=en#regular-expressions-regex)
    - [WATTS](https://doc.sitespect.com/knowledge/build?hsLang=en#watts)
    - [Recommendations](https://doc.sitespect.com/knowledge/build?hsLang=en#recommendations)
- [Monitor](https://doc.sitespect.com/knowledge/monitor?hsLang=en)
- [Analyze](https://doc.sitespect.com/knowledge/analyze?hsLang=en#main-content)

    - [Data Export and Integration](https://doc.sitespect.com/knowledge/analyze?hsLang=en#data-export-and-integration)
    - [SiteSpect Reports](https://doc.sitespect.com/knowledge/analyze?hsLang=en#sitespect-reports)
- [Site](https://doc.sitespect.com/knowledge/site?hsLang=en#main-content)

    - [Tools](https://doc.sitespect.com/knowledge/site?hsLang=en#tools)
    - [Configuration](https://doc.sitespect.com/knowledge/site?hsLang=en#configuration)
- [Developers](https://doc.sitespect.com/knowledge/developers?hsLang=en#main-content)

    - [API Reference](https://doc.sitespect.com/knowledge/developers?hsLang=en#api-reference)
    - [Code Samples](https://doc.sitespect.com/knowledge/developers?hsLang=en#code-samples)
    - [Tips & Tricks](https://doc.sitespect.com/knowledge/developers?hsLang=en#tips-tricks)
- [Mobile](https://doc.sitespect.com/knowledge/mobile?hsLang=en)
- [Implementation, Deployment, and Security](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#main-content)

    - [How does SiteSpect work with CDNs?](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#how-does-sitespect-work-with-cdns)
    - [Single Tenant Implementations](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#single-tenant-implementations)
    - [Security Features](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#security-features)
    - [Deployment and Implementation Overview](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#deployment-and-implementation-overview)
    - [SiteSpect Engine & Admin API](https://doc.sitespect.com/knowledge/implementation-deployment-and-security?hsLang=en#sitespect-engine-admin-api)
- [Third-Party Integration](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#main-content)

    - [Google](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#google)
    - [Zuko](https://doc.sitespect.com/knowledge/third-party-integration?hsLang=en#zuko)
- [Troubleshooting](https://doc.sitespect.com/knowledge/troubleshooting?hsLang=en)
- [Releases](https://doc.sitespect.com/knowledge/releases?hsLang=en#main-content)

    - [Superfresh](https://doc.sitespect.com/knowledge/releases?hsLang=en#superfresh)
- [Feedback](https://doc.sitespect.com/knowledge/feedback?hsLang=en)

- [A/B Testing](https://www.sitespect.com/testing-and-experimentation/)
- [Personalization](https://www.sitespect.com/personalization-targeting/)
- [Recommendations](https://www.sitespect.com/recommendations/)

[![Monetate-Logo-Full-Color-1](https://doc.sitespect.com/hs-fs/hubfs/Monetate-Logo-Full-Color-1.png?width=200&height=29&name=Monetate-Logo-Full-Color-1.png "Monetate-Logo-Full-Color-1")](http://monetate.com)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, Monetate