> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/connectors/destinations/ab-tasty.md).

# AB Tasty

Personalise the AB Tasty experience by the segment a user belongs to, through the browser's local storage.

The AB Tasty connector lets you customise the user experience according to the segment a visitor belongs to. No identifier leaves your CDP: the segment list is written to the browser's local storage, and AB Tasty reads it from there.

<table data-search="false"><thead><tr><th width="220">Connection</th><th></th></tr></thead><tbody><tr><td><strong>Type</strong></td><td>Client-side (local storage)</td></tr><tr><td><strong>Category</strong></td><td><a href="/connectors/partner-types/on-site-personalisation.md">On-site personalisation</a></td></tr><tr><td><strong>Identifiers sent</strong></td><td>None - segment names only, kept in the browser</td></tr><tr><td><strong>Authentication</strong></td><td>None</td></tr></tbody></table>

## Description

### What is AB Tasty?

AB Tasty is an experimentation and on-site personalisation platform. Its campaigns are targeted by trigger conditions evaluated in the visitor's browser, which is where it picks up the mediarithmics segment list.

### What you can do with this connector

* Trigger an AB Tasty campaign only for users in a given mediarithmics segment.
* Personalise on-site experience from CDP data without sharing identifiers with AB Tasty.

### Which identifiers are sent

None. The connector stores segment data in the visitor's local storage; AB Tasty retrieves it from there. The value holds the **technical name** of each segment - assigned by default if you did not set one when creating the segment, and editable afterwards.

## Connector setup

### Prerequisites

* The mediarithmics tag installed on the site, calling `syncFeeds` - the call that enables client-side feeds. See the **Setup & Monitor** section, under *Collect & manage your data › Collect data in real time › Web tracking*.
* An AB Tasty account, with access to campaign targeting.

### Setup steps

{% stepper %}
{% step %}
**Select the Browser Local Storage connector in the client-side section.**
{% endstep %}

{% step %}
**Fill in the configuration.**

<table data-search="false"><thead><tr><th width="260">Field</th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Identifies the feed in the platform. Any name.</td></tr><tr><td><strong>Local Storage Field Name</strong></td><td>Must be <code>mediarithmics-segments</code>.</td></tr></tbody></table>

{% hint style="danger" %}
The key must be exactly `mediarithmics-segments`. The AB Tasty targeting code below reads that key by name, and nothing else will match.
{% endhint %}
{% endstep %}

{% step %}
**Add the targeting code to each AB Tasty campaign.**

In AB Tasty, go to **Targeting › Trigger › Expert › Code** and add the snippet in [AB Tasty campaign configuration](#ab-tasty-campaign-configuration).
{% endstep %}
{% endstepper %}

Creating and activating the feed on a segment is covered in the **Audience & Activation** section, under *Activate your audiences › Send your first-party data to a destination*.

### AB Tasty campaign configuration

AB Tasty does not read the local storage key on its own. Each campaign you create needs this code, with `{{SEGMENT_TECHNICAL_NAME}}` replaced by the technical name of the segment you are targeting.

```javascript
const data = localStorage.getItem('mediarithmics-segments');
if (data) {
  const formattedData = JSON.parse(data);
  const results = formattedData.segments ?
    formattedData.segments.some(item => item.name === "{{SEGMENT_TECHNICAL_NAME}}") : false;
  if (results) {
    abResolve(true);
  }
}
```

{% hint style="info" %}
The segment technical name is shown on the segment's edit page. See the **Audience & Activation** section, under *Build your audiences › Segment reference*.
{% endhint %}

## Good to know

This connector is the [Browser Local Storage](/connectors/destinations/browser-local-storage.md) connector with a fixed key. Its timing rules apply here too: a user appears in the key only after the segment has been recalculated following their qualifying visit, and the segment list refreshes once every 24 hours.

## FAQ

#### Do I have to add the code to every campaign?

Yes. The snippet is a per-campaign trigger, so each AB Tasty campaign that targets a mediarithmics segment needs it.

#### Can I use a different local storage key?

No. It must be `mediarithmics-segments` for the targeting code shown above to work.

#### Where do I find the technical name to put in the snippet?

On the segment's edit page in mediarithmics.

## Partner documentation

AB Tasty documents its own platform at <https://docs.abtasty.com/>. Use it for anything that happens on the partner side of this connector: account setup, the fields the partner expects, and its own limits.

## Related pages

<table data-view="cards" data-search="false"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Browser Local Storage</strong></td><td>The underlying connector, its timing rules and its other uses.</td><td><a href="/connectors/destinations/browser-local-storage.md">Browser Local Storage</a></td></tr><tr><td><strong>Kameleoon - Client Side</strong></td><td>The same mechanism, for Kameleoon.</td><td><a href="/connectors/destinations/kameleoon/client-side.md">Client Side</a></td></tr></tbody></table>


---

# 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.mediarithmics.io/connectors/destinations/ab-tasty.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.
