The Toggle Switch shows a title, an optional description and an on/off switch, for example "Weekly digest" with a Subscribe switch. Readers turn it on or off with one click, and their choice is saved to their profile.
Signed-in readers see the switch as they left it, on every page and device. If a choice can't be saved, the reader sees "That didn't save. Please try again."
The choice is saved to a Yes/No profile field you choose, such as "Weekly digest". Create it in Data Management > User Data > Data Schema, or with the Create a field link in the experience. See Profile Fields.
Audience Operation > Experience and click New Experience.Next Step.| Setting | What it does |
|---|---|
| Title | The heading next to the switch. Required. |
| Switch label | The text right beside the switch, e.g. "Subscribe". The title is used if you leave it empty. |
| Description | Optional text under the title. |
| Saved to field | The Yes/No profile field you choose for the choice. Required. |
| Switch colour | The colour of the switch when it is on. |
Save Changes. The preview shows how the switch looks.Place the switch where it should appear, for example on your newsletter or account page. Copy the snippet from the experience, which fills in its ID, or replace EXPERIENCE_ID yourself:
<div data-exp="unis-switch" data-exp-id="EXPERIENCE_ID"></div>
You can leave out data-exp-id. The switch then uses the Switch experience delivered to the page. To show several switches on one page, add each one with its own ID.
When a reader who is not signed in turns the switch on, the sign-up window opens. Once they have signed up or logged in, their choice is saved.
Turning the switch on sets the field you chose to Yes, and turning it off sets it to No. Use the field in Segments, for example the field equals Yes, to target readers who turned it on.
See the Toggle Switch experience and Set up experiences on your website.
Identity, consent, audience, and subscription insights for publishers. A few emails a month, no spam.