> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-engage/marketers-and-editors/ab-testing/types-of-ab-tests/document-type-test.md).

# Document Type Test

Umbraco Engage enables running A/B tests on pages using a specified Document Type. This article covers how and when to use this type of test.

Test all pages using a specific Document Type with this test. Select the Document Type(s) you want to test and Umbraco Engage makes sure the correct CSS and JavaScript is inserted to the correct pages.

The test type **Content type** can be started in the [Engage section](/umbraco-engage/marketers-and-editors/introduction/the-umbraco-engage-section.md) and in the [Workspace View](/umbraco-engage/marketers-and-editors/introduction/workspace-views.md). The type is selected in the **Test setup** section.

![Setup Test](https://2164986937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fds5IoWmsX6a6ooVdYthx%2Fuploads%2Fgit-blob-15198f90fd6b060b931e79b9d10900cbb9024ef9%2Fengage-ab-test-content-type-test.png?alt=media)

The test allows you to select one or more Document Types within Umbraco. On all pages using the selected Document Type(s) the A/B Test will render the additional CSS and JavaScript you will enter. The CSS and JavaScript must not create any side effects on these pages. This is a manual task.

Once you have selected the pages you want to test, you can specify one or more variants. For each variant, select **CSS / JS**. This opens the **Edit variant** dialog, where you can write JavaScript or CSS:

![Edit variant using CSS or JavaScript](https://2164986937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fds5IoWmsX6a6ooVdYthx%2Fuploads%2Fgit-blob-60ce39ceb744fbf22950a12f21a30f63cd55de30%2Fengage-ab-test-content-type-javascript.png?alt=media)

In this example, some JavaScript changes the page's background color.

You can check if your code works by selecting **Preview** next to the variant.

After creating all variants, start your A/B testing as written in the [Setting up the A/B test](/umbraco-engage/marketers-and-editors/ab-testing/setting-up-the-ab-test.md) article.


---

# 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.umbraco.com/umbraco-engage/marketers-and-editors/ab-testing/types-of-ab-tests/document-type-test.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.
