> 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/browser-local-storage.md).

# Browser Local Storage

Write segment membership into the browser's local storage, where any on-site partner can read it.

The Browser Local Storage connector writes the segments a user belongs to into that user's **browser local storage**. No identifier leaves your CDP. A partner already running on your site reads the value and adapts the experience, or activates the user on-site.

<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 this connector does

Rather than sending identifiers to a partner, the connector stores segment data in the visitor's local storage under a key you choose. Any partner integrated on your website can then read that key.

The value holds the **technical name** of each segment the user belongs to. If you did not set a technical name when creating the segment, mediarithmics assigns a default one, which you can change afterwards by editing the segment.

### What you can do with this connector

* Personalise on-site experience by segment, without sharing anything with a third party.
* Feed on-site partners that have no dedicated connector, through a custom process.
* Serve several partners from one feed, or give each its own key.

{% hint style="warning" %}
The Browser Local Storage connector can only be used for **on-site activation**. It does not send anything to a partner's servers.
{% endhint %}

### Which identifiers are sent

None. Nothing leaves the CDP; the segment list stays in the visitor's browser.

## Connector setup

### Prerequisites

* The mediarithmics tag installed on the site where the personalisation happens, calling `syncFeeds` - the call that enables client-side feeds. Without it, no segment is written to local storage. See the **Setup & Monitor** section, under *Collect & manage your data › Collect data in real time › Web tracking*.

### 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; it is not visible on the site.</td></tr><tr><td><strong>Local Storage Field Name</strong></td><td>The local storage key that will hold the segments. Defaults to <code>mics_segments</code>. Connectors built on this one require a specific value - see below.</td></tr></tbody></table>
{% 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*.

## Supported partners

Two partners have a dedicated page, because each expects a specific local storage key:

<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>AB Tasty</strong></td><td>Key must be <code>mediarithmics-segments</code>.</td><td><a href="/connectors/destinations/ab-tasty.md">AB Tasty</a></td></tr><tr><td><strong>Kameleoon - Client Side</strong></td><td>Key must be <code>mics_kam_seg</code>.</td><td><a href="/connectors/destinations/kameleoon/client-side.md">Client Side</a></td></tr></tbody></table>

The connector can also back custom processes with other partners - Google and FreeWheel, for example. Contact your account manager to work out how.

{% hint style="info" %}
[Curated Audiences (SDA)](/connectors/destinations/curated-audiences-sda.md) also writes to local storage, but to a fixed key (`mics_sda`) and in the IAB segment-taxonomy format. Use it when the consumer is a bidding integration such as Prebid.js rather than an on-site personalisation tool.
{% endhint %}

## Good to know

A newly activated segment does not appear in local storage straight away. For a segment ID to show up in the key, all of the following must have happened:

1. The user had a visit matching the rules of your segment.
2. The segment was **calculated after** that visit, so the user is genuinely in it.
3. The user came back to the website, **more than 24 hours after the first visit**.

The segment list is refreshed **once every 24 hours**, based on the `lastFeedRefreshDate` value stored in local storage.

## FAQ

#### Does any personal data leave my CDP?

No. The connector writes segment names into the visitor's own browser. Nothing is sent to a partner's servers.

#### Why is my segment not in the local storage key yet?

Most often because the segment has not been recalculated since the user's qualifying visit, or because the 24-hour refresh has not come round. See [Good to know](#good-to-know). If no segment ever appears, check that your tag calls `syncFeeds` - see [Prerequisites](#prerequisites).

#### What decides the segment name I see in the value?

The segment's **technical name**. If you did not set one, mediarithmics assigned a default, which you can change by editing the segment - see the **Audience & Activation** section, under *Build your audiences › Segment reference*.


---

# 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/browser-local-storage.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.
