# Celebrus Integration

This integration captures AB Tasty experiment exposures and pushes them to the **Celebrus Data Collection platform** using template variables. It is designed for use in tag managers or other environments where AB Tasty template variables are available (`{{campaignId}}`, `{{campaignName}}`, etc.). It ensures **real-time data capture**, linking AB Tasty campaigns to Celebrus sessions for downstream analytics and personalisation.

## Prerequisite

* AB Tasty implemented with template variables accessible in your environment.
* Celebrus **Data Collection for HTML5** library loaded (`window.CelebrusEQ` available).
* Basic knowledge of JavaScript or tag manager usage.
* Optionally, a **consent management solution** to respect visitor privacy regulations.

## Template Variables

| Variable            | Description                   | Example                |
| ------------------- | ----------------------------- | ---------------------- |
| `{{campaignId}}`    | AB Tasty experiment ID        | `12345`                |
| `{{campaignName}}`  | AB Tasty experiment name      | `"Homepage Hero Test"` |
| `{{variationId}}`   | AB Tasty variant bucket ID    | `B`                    |
| `{{variationName}}` | AB Tasty variant display name | `"Variant B"`          |

## Implementation Snippet

Insert the following code wherever both AB Tasty template variables and Celebrus library are available. For guidance on where to place code in AB Tasty, see [AB Tasty Custom Code Integration](/integrations/custom-integrations/custom-integration-connector-with-a-rd-party-tool-push-data.md).

```
if (window.CelebrusEQ) {
  window.CelebrusEQ.send('ABTasty', {
    campaignId: {{campaignId}},
    campaignName: {{campaignName}},
    variationId: {{variationId}},
    variationName: {{variationName}}
  });
}
```

* AB Tasty experiment information (`campaignId`, `variationId`, etc.) is successfully injected into the payload.
* The network string is intentionally obfuscated; do not expect human-readable JSON.
* Cookies like `veryv9csacdPersisted` ensure consistent tracking of the same visitor across sessions, which is crucial for valid experimentation analytics.
* The `CelebrusEQ.send` API fires an event payload to your back-end collector.
* In the Network tab, you may see an obfuscated string like:

```
z=_1a0e2bf27c854f35…&y=99715544900!903!E=54892962=1590!aaDx+…
```

* This is Celebrus’ encoding mechanism: it compresses and encrypts event and session data into a single query string. This is standard for production traffic and ensures a minimal footprint and secure transport.

{% hint style="info" %}

* The `{{campaignId}}`, `{{campaignName}}`, `{{variationId}}`, and `{{variationName}}` placeholders are replaced at runtime by your tag manager or AB Tasty template engine.
* `window.CelebrusEQ.send` sends the data directly into the Celebrus event queue.
* The `if (window.CelebrusEQ)` check prevents errors if the library is not loaded.
  {% endhint %}

## Data Flow Diagram

<figure><img src="/files/zHi59lE8Of6j3RjxwGFK" alt="Flowchart showing how AB Tasty variables send real-time data to Celebrus EQ.  On the left, a box labeled “AB Tasty Vars” connects with arrows to two destinations:  A box labeled “Tag Manager / Custom HTML Snippet,” which then connects to “Celebrus EQ JS window.CelebrusEQ.”  A yellow box labeled “Real-time data via AB Tasty code and Connector,” which also connects to “Celebrus EQ JS window.CelebrusEQ.” The diagram illustrates two possible data flows from AB Tasty to Celebrus EQ: one through a tag manager or HTML snippet, and one directly via AB Tasty code and Connector."><figcaption></figcaption></figure>

## Outcome

* Every AB Tasty experiment exposure is captured in Celebrus in real-time.
* Template-based integration ensures non-developers can deploy this snippet quickly.
* Enables cross-platform analytics, reporting, and personalization based on experiment participation.
* Provides a foundation for **advanced behavioural tracking and session stitching** across campaigns.

## <br>


---

# 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://docs.abtasty.com/integrations/custom-integrations/celebrus-integration.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.
