# Content Testing

Use content testing to show different site content per Test Group.

```tsx
const SomeComponent = () => {
  const experienceId = "<EXPERIENCE_ID>";
  const variation = useIgVariation(experienceId);

  const DynamicComponent = useMemo(() => {
    if (variation.isReady) {
      if (variation.variation?.name === "New Group 1") {
        return (
          <div>
            This component only renders if the Variation is "New Group 1"
          </div>
        );
      } else {
        return (
          <div>
            This component only renders if the Variation is the Control Group
          </div>
        );
      }
    } else {
      // Intelligems configuration has not loaded yet, or
      // Intelligems configuration never requested
      return null;
    }
  }, [variation]);

  return <div>{DynamicComponent}</div>;
};
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://headless.intelligems.io/version-1.2.16/examples/content-testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
