Skip to main content

Preference Center

If you want to give logged-in users a "Manage My Privacy" page — consent choices, data requests, and grievances, all scoped to that one user — you don't have to build that UI yourself. Bytemonk hosts a ready-made Preference Center you can embed with an iframe, on top of the same server-side integration flow you'd otherwise use to build a custom UI.

When to use this instead of building your own UI

Use this when you want the "logged-in privacy settings page" experience from Server-Side Integration without writing the frontend yourself. If you want full control over the look and feel, or need to embed it inline (not in an iframe) inside a React app, build your own UI against the public API directly instead — the Preference Center is just one frontend built on the same endpoints your own code would use.

The flow​

  1. Your backend mints a principal token exactly as described in Server-Side Integration — a Secret-key-gated call to POST /api/v1/server/cmp/principals/token with your own internal user ID as externalId. Also pass your site's hostname as sourceDomain (for example www.example.com) so consent given in the Preference Center is recorded against your website rather than the Bytemonk host the iframe is served from.
  2. Your frontend renders an iframe pointing at the Preference Center, passing your Publishable org key and the token you just minted in the URL fragment, not a query string (fragments aren't sent to the server or typically captured in access logs):
<iframe
src="https://api.bytemonk.co/preference-center/#orgKey=pub_...&token=8a1d2f6c-....-....-....-............"
style="width: 100%; height: 800px; border: 0;"
></iframe>

That's the entire integration. The page itself calls the same /api/v1/public/cmp/* endpoints documented in the API Reference — consent, DPR, grievances — using the credentials in the fragment; it never talks to your backend directly.

Add these to the same fragment, separated by &:

SettingExampleWhat it does
notices&notices=privacy-policy,marketingShow only these consent notices (by notice group key), in their usual order. Leave it out to show every active notice.
lang&lang=hiStart in this language instead of English. The visitor can still change it from the language menu.
theme&theme=darkStart in this colour theme: light, dark or system (follow the visitor's device, the default). A choice the visitor has already saved takes priority.
template&template=fintechStart in this design: classic (the default), enterprise, fintech, material, grouped or console. See Design templates. A choice the visitor has already saved takes priority.
<iframe
src="https://api.bytemonk.co/preference-center/#orgKey=pub_...&token=...&notices=privacy-policy&lang=hi"
style="width: 100%; height: 800px; border: 0;"
></iframe>

What's inside​

The page looks and works the same as the Bytemonk WordPress plugin's privacy portal: a top bar with three tabs, a language menu, a "Need help?" shortcut to grievances, and an Appearance menu with System, Light and Dark (see Appearance).

  • Consent Preferences — the consent notices your organization has published.
    • One notice: it opens straight away.
    • Several notices: the visitor first sees a list showing each notice's status ("Consent given", "Withdrawn" or "Not yet responded") and when they last responded, then opens the one they want and uses "All categories" to go back. Use the notices setting above to limit the list.
    • Inside a notice: a three-step flow (review, choose, confirmation) with I Consent / I Do Not Consent for each purpose, Accept All, Reject All and Save Preferences. Required purposes show as "Always On". A summary card beside the choices shows the current state of every purpose.
  • Data Requests — submit a new Data Principal Request (DPR): Access, Correction, Erasure or Nomination. Past requests are listed with their status; selecting one opens its message thread so the visitor can reply.
  • Grievances — file a new grievance, see past filings and their status, and reply on the thread.

Languages​

The page itself is available in English and 22 other Indian languages (Assamese, Bengali, Bodo, Dogri, Gujarati, Hindi, Kannada, Kashmiri, Konkani, Maithili, Malayalam, Manipuri, Marathi, Nepali, Odia, Punjabi, Sanskrit, Santali, Sindhi, Tamil, Telugu and Urdu). The text of each notice is shown in the chosen language when your organization has published a translation of it; otherwise the notice's default language is used.

Appearance​

The Appearance menu in the top bar lets the visitor pick System, Light or Dark. System follows their device and switches automatically when it does. Whatever they pick is saved on that device and becomes their default next time. To set the starting theme for everyone who opens your link, add theme to the link (see Optional link settings); a visitor's own saved choice still wins.

The page is also built for keyboard and screen-reader use: visible focus on every control, a skip-to-content link, and status messages that are read out when a choice is saved.

Design templates​

The Preference Center comes in six designs. They all offer the same choices and the same Data Requests and Grievances pages; only the layout, type and look change. Each one works in light and dark.

TemplateLook
classicThe original layout with a summary panel beside the choices. This is the default.
enterpriseDense accordion rows with a side menu and the state written beside each switch.
fintechA card per purpose with a live summary ring and a sticky summary panel.
materialTonal cards, rounded shapes and an underlined tab bar.
groupedA narrow, phone-style column of grouped lists with footnotes.
consoleA quiet monochrome settings box with a sidebar.

Choose the starting design with template in the link (see Optional link settings). Every design also has a Design menu that lets the visitor switch; their choice is saved on their device and takes priority over the link the next time they open it.

<iframe
src="https://api.bytemonk.co/preference-center/#orgKey=pub_...&token=...&template=fintech&theme=dark"
style="width: 100%; height: 800px; border: 0;"
></iframe>

Session length​

The token minted in step 1 is valid for 60 minutes (longer than the 15-minute browser-widget token — see Issue server-to-server token) — long enough for a typical settings-page session. If it expires mid-session, the Preference Center shows a "this session has expired" message rather than failing silently; reopening it from your own logged-in page (repeating the flow above) mints a fresh one.

Styling and design​

You can design the page in the dashboard (Consent Management → Preference Centers) without writing code, and add your own CSS on top. The page never runs customer JavaScript or HTML, so it stays safe to embed and cannot be made to hide what the law requires it to show.