> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/form-management/publish-deploy/website-intercepts/how-to-implement-intercepts.md).

# How to implement intercepts

Since intercepts are integrated surveys or forms embedded within your existing website, they require the setup of one or multiple [intercept hosts](/form-management/publish-deploy/website-intercepts/intercept-hosts.md). Each intercept host acts as a container for displaying [intercepts ](/form-management/publish-deploy/website-intercepts/intercepts.md)and provides a unique JavaScript code snippet.

To implement an intercept on your website:

1. **Set Up Intercept Hosts**: Define intercept hosts for the pages where you wish to display intercepts. Each host is customizable to match your desired triggering and targeting criteria and you can link dynamically one or more surveys for each hosts.
2. **Deploy JavaScript Code**: After configuring the intercept host, copy the unique JavaScript code it generates and add it to the relevant pages on your site. This code is essential for activating the intercept and allows it to load seamlessly within the chosen page(s).
3. **Customize Triggering and Targeting**: Adjust the settings for each intercept to determine when and to whom it appears. You can target users based on factors such as behaviors, navigations, and custom data. Additionally, you can fully control the intercept’s appearance (e.g., pop-up, banner, or embedded form) to align with your site’s design and optimize user experience using your own styles, logs and custom CSS.

&#x20; &#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/form-management/publish-deploy/website-intercepts/how-to-implement-intercepts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
