Toggle Switch

Overview

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."

Before you start

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.

Set up

  1. Go to Audience Operation > Experience and click New Experience.
  2. Pick Switch, then click Next Step.
  3. Enter a Name, choose the Project and turn on Enable.
  4. Set the settings:
SettingWhat it does
TitleThe heading next to the switch. Required.
Switch labelThe text right beside the switch, e.g. "Subscribe". The title is used if you leave it empty.
DescriptionOptional text under the title.
Saved to fieldThe Yes/No profile field you choose for the choice. Required.
Switch colourThe colour of the switch when it is on.
  1. Click Save Changes. The preview shows how the switch looks.

Put it on your pages

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.

Readers who are not signed in

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.

Use the choice in segments

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.

Stay ahead in first-party data

Identity, consent, audience, and subscription insights for publishers. A few emails a month, no spam.

By subscribing you agree to our privacy policy.