Site Intercept - Implementing Site Intercept | Qualtrics

Implementing Site Intercept


Implementing Site Intercept is as simple as placing a snippet of JavaScript code onto your website. This guide will cover where to find that code, where to place it on your website, and what to expect once this code is live.

Which code do I implement?

Site Intercept provides a few variations of code for you to implement on your website. Although each variation has its use, we recommend using the Published version of the Zone Code, with Auto Protocol and No Sampling. Here’s a brief explanation of what that means and the other available variations:

Zone Code vs Intercept Code

With Zone Code, you can create new Intercepts and turn them on and off without ever needing to update the code on your website. The alternative would be to use Intercept Code, which requires a new snippet of code for each Intercept you create.

To access Zone Code:

  1. Navigate to the Zones section.image00
  2. Choose which Zone you would like to implementimage02
  3. Select Get Zone Code.image03


To access Intercept Code:

  1. Navigate to the Intercepts section.image07
  2. Choose which Intercept you would like to implement.image01
  3. Select Get Intercept Code.image05


Published Code vs Editing Codeimage06

With the Published version of the code, changes you make to Intercept and Creatives in the Zone won’t go live until you click Publish.

The publishing system helps with quality control and is highly recommended. When using Editing code, any changes you make to Creatives or Intercepts will automatically go live on your website. Editing code may be appropriate for testing on a development or test version of your website.

Protocol (HTTP/HTTPS)

Protocol refers to how content is delivered to the visitors’ web browser. Site Intercept offers three options — deliver the content insecurely (HTTP), deliver it securely (HTTPS), or follow whichever option your website is using (Auto). Auto is generally the best option.



Adding sampling to the code can help you reduce your Site Intercept usage, measured by Page Views. When sampling is in place, Site Intercept code is only run for a percentage of your website visitors or website page views. Changes to this setting actually modify a portion of the Intercept or Zone Code, which means if you already have the code on your website, you will need to implement new code each time you want to modify the sample rate. Because of this extra step, many will choose to use “No Sampling” and manage the sampling in the Change Options menu of the individual Intercepts.

  • Sample Visitors will only run Site Intercept code for a portion of your website visitors. For each visitor, it will either run on every page they visit, or on none of the pages they visit.
  • Sample Page Views will run the code n out of 100 page views for any visitor. Because the code does not run on every page, certain data points tracked by Site Intercept (such as Site History, Time Spent on Site, Page Views, etc.) will be incomplete.

Where do I place the code?

Site Intercept code can be placed on any page where you may want to display Creatives to your visitors. In addition, you will also want to place the code on any pages for which you’d like Site Intercept to track or collect information.

Example: Showing a PopOver to all visitors on the home page only requires code to be placed on the home page. However, showing this PopOver to only those home page visitors who have previously been to the shopping cart page requires Site Intercept know that if a visitor has visited the shopping cart. Therefore, code must be placed on the shopping cart page as well.
For the easiest implementation, we recommend placing the code in a global header or footer, so it loads on all pages of the website. This is the most flexible and useful implementation because it allows you to run Intercepts on any page of your site. However, this method will also lead to a higher level of usage, since each time the code runs on a page will be considered a Page View. Be sure to check that your license will accommodate this volume of usage.

If you are not running any Intercepts at the moment, you can save on your Page Views by deactivating the Zone. For help deactivating a Zone, check out our Manage Zones support page.

Qtip: If you are adding Intercept code to your web page, the only way to prevent your Page Views from incrementing is to deactivate the associated Zone or remove the Intercept code from your web page. Deactivating an Intercept only prevents the intercept from being displayed.

Site Intercept code may be placed anywhere within the page HTML, although it is most commonly implemented in the page header or footer. Many clients choose to implement code through tag management systems. However, our Support team is unable to provide guidance or help on how to implement Site Intercept code in a tag management system.

Please be aware that our Support team also does not support or troubleshoot an implementation that includes custom modifications to the original code.

How does this code work?

The Site Intercept code is a lightweight snippet that sends a request to Qualtrics servers to see which (if any) Creatives should be shown to the visitor.

Architecture Diagram (Simplified)

  1. A visitor loads a page that contains Site Intercept code.
  2. The Site Intercept code sends a server request checking which Intercepts are Active (turned on) and if the visitor has qualified for any of them.
  3. If necessary, a second server request is made, providing additional details needed to determine if a visitor qualifies for a Creative.
  4. Lastly, any Creatives that the visitor should see are loaded and displayed.

Architecture Diagram (Technical)


  1. A website visitor will view a page in their browser containing the Site Intercept code.
  2. The code is cued for downloading once the page loads.
  3. Site Intercept JavaScript code is requested from Qualtrics servers.
  4. Qualtrics obtains the Site Intercept definition from the database and builds the code appropriately.
  5. If necessary, a second request is sent to the servers to obtain the required data.
  6. JavaScript code is returned to the browser and executed.
  7. The Creative appears on the page.

How will this code affect my website?

Site Intercept code is designed to load after all and independent from the rest of the page (asynchronously). This means that if anything should ever happen to slow down Site Intercept requests (an issue on our servers), website visitors will not notice any anything because the page has already loaded before requests to our servers are made.

Technical Tip: Load time for Site Intercept typically runs between 400 and 600ms. The JavaScript code returned by the server is compressed using gzip and automatically decompressed by the browser for operational efficiency. This shortens the load time by reducing the size of the Site Intercept content to 3-10 kilobytes. The returned code size and time may vary depending on Creative type, content, and SSL support.