Getting Started
MediaOS Embed components are standard HTML custom elements powered by Vue 3. They connect automatically to your MediaOS account using the metadata tags on each page.
Installation
Add the following to every page where you want to use embed components. Place the script tag at the bottom of <body> or use defer.
Once the script loads, all MediaOS custom elements are available. Place any component tag in your HTML and it will render automatically.
JavaScript API
After the script loads, a global window.MediaOS object is available with helper methods.
| Method | Signature | Description |
|---|---|---|
AddToCart | (offerId: number) | Add an offer to the shopping cart by ID. |
GetContactToken | () → string|null | Return the current authenticated contact's JWT token. |
RunWorkflow | (id: number) | Trigger a MediaOS workflow by ID. |
UserSsoJwt | (jwt: string) | Authenticate a user via a custom SSO JWT token. |
ClearCache | () | Clear cached account/user settings from local storage. |
GetUser | () → User|null | Return the current user object (or null if not logged in). |
LogStats | (isFinal?: bool) | Manually flush an analytics stat event to the server. |
AdServerImpression | (adInsertionID, adID) | Log an ad impression event. |
AdServerClick | (adInsertionID, adID) | Log an ad click event. |
AdServerHover | (adInsertionID, adID) | Log an ad hover event. |
EnableCookies | () → Promise | Grant GDPR cookie consent and record it server-side. See Privacy & GDPR. |
DisableCookies | () | Withdraw GDPR cookie consent and purge stored identifiers. |
GetCookieConsent | () → bool | Whether the visitor has granted GDPR cookie consent. |
GrantConsent | (source?: string) | Grant all tracking-consent categories (analytics, advertising, sale/share). |
DenyConsent | (source?: string) | Deny all tracking-consent categories. |
DoNotSellOrShare | (source?: string) | CPRA opt-out: keep analytics, deny advertising and sale/share. |
SetConsent | (partial: object) | Fine-grained consent update per category. |
GetConsent | () → object | Current consent snapshot. |
Triggering Workflows via JavaScript
URL Actions
Any page with the MediaOS embed script loaded automatically watches for special #mos hash fragments and triggers the corresponding action. Actions fire on page load, whenever a visitor clicks an <a> link whose href contains one of the hashes, and on browser navigation events — so you can wire up your site's menus, buttons, and links with plain HTML, no JavaScript required.
Authentication Actions
| Hash | Action |
|---|---|
#mosLogin | Opens the login modal. |
#mosRegister | Opens the registration modal. |
#mosLogout | Logs the current user out. (Requires login.) |
Account Panel Actions
These open the user account panel to a specific section. They require the visitor to be logged in — if not, the login modal opens instead (any #mos hash triggers the login modal for anonymous visitors), and the requested action runs once they authenticate and the hash is processed again.
| Hash | Opens Account Section |
|---|---|
#mosAccount | My Account — profile and contact details. |
#mosNewsletters | Newsletter subscription preferences. |
#mosBookmarks | Saved bookmarks. |
#mosPurchases | Purchase history. |
#mosMemberships | Memberships. |
#mosSubscriptions | Subscriptions. |
#mosBusinessListings | The user's business directory listings. |
#mosEventListings | The user's event listings. |
Other Actions
| Hash / Parameter | Action |
|---|---|
#mosPN | Triggers the OneSignal push-notification permission prompt. (Requires login and a configured OneSignal App ID.) |
#clear | Clears cached MediaOS account/user settings from local storage and reloads the page (hash is removed on reload). |
#debug | Enables test/debug mode for the embed components on the current page. |
?mode=test | Query-string alternative to #debug — enables and persists test mode via local storage. |
?mosMessage=... | Displays the given message to the visitor in an alert on page load. |
?mosLandingPageID=... | Forces a specific landing page / access-rule wall to display. |
?offerID=... | Adds the specified offer to the shopping cart on page load (useful for direct buy links in emails or ads). |
Notes
- Hash matching is a substring check — the hash may appear anywhere in the link's URL.
- For anonymous visitors, any link containing
#mosopens the login modal (except#mosRegister, which opens registration). - Actions also run when navigating directly to a URL containing the hash (e.g., linking from an email campaign:
https://yoursite.com/#mosNewsletters).
Data Privacy & Consent (GDPR / CPRA)
MediaOS Embed ships with a built-in privacy consent manager that handles GDPR cookie consent, CPRA "Do Not Sell or Share" opt-outs, and the browser's Global Privacy Control (GPC) signal. It also broadcasts consent state to common third-party tag platforms (Google Consent Mode v2, GTM dataLayer, Meta Pixel) so a single call from your consent banner keeps everything in sync.
default Google Consent Mode v2 state so a visitor's prior opt-out is honored on every page view.GDPR Cookie Consent
Cookie consent controls whether MediaOS persists identifiers (unknown visitor ID, bookmarks, group memberships) in the browser at all. Granting consent also records the consent event server-side against the visitor for your GDPR audit trail.
| Method | Signature | Description |
|---|---|---|
MediaOS.EnableCookies | () → Promise | Grant cookie consent. Enables local persistence and logs the GDPR consent event server-side. |
MediaOS.DisableCookies | () | Withdraw cookie consent. Removes the stored unknown-visitor ID, bookmarks, and group data. An active login session is treated as "strictly necessary" and is preserved. |
MediaOS.GetCookieConsent | () → bool | Returns true if the visitor has granted cookie consent. |
Tracking Consent (CPRA / Consent Mode)
Tracking consent is managed per category. Every change is persisted, re-broadcast to third-party tag platforms, and attached to all outbound MediaOS analytics/ad beacons (including a noIp flag that tells the server to suppress IP and postal-code capture for opted-out visitors).
| Category | Default | Covers |
|---|---|---|
analytics | granted | First-party page-view / dwell-time measurement. |
advertising | denied | Personalized ads and ad measurement. |
saleOrShare | denied | Sale or sharing of personal information with third parties (CPRA §1798.135). |
| Method | Signature | Description |
|---|---|---|
MediaOS.GrantConsent | (source?: string) | Grant all categories ("Accept All"). |
MediaOS.DenyConsent | (source?: string) | Deny all categories ("Deny All"). |
MediaOS.DoNotSellOrShare | (source?: string) | CPRA opt-out shortcut — keeps first-party analytics on, denies advertising and sale/share. |
MediaOS.SetConsent | ({analytics?, advertising?, saleOrShare?}) | Fine-grained update. Each value is 'granted' or 'denied'; omitted categories are unchanged. |
MediaOS.GetConsent | () → object | Current snapshot: {analytics, advertising, saleOrShare, gpc, source, updatedAt}. |
The MediaOS.Consent Object
For integrations that need to react to consent changes (GTM, GA4, ad tags), a richer API is exposed at window.MediaOS.Consent. A mediaos:consentchange CustomEvent is dispatched on window every time consent changes, with the new snapshot in event.detail.
| Member | Signature | Description |
|---|---|---|
Consent.get | () → object | Current consent snapshot. |
Consent.set | (partial: object) | Same as MediaOS.SetConsent. |
Consent.optIn | () | Grant everything (no-op for sale/share and advertising when GPC is asserted). |
Consent.optOut | () | Deny everything. |
Consent.isOptedOut | () → bool | true if GPC is asserted or sale/share is not granted. When true, MediaOS beacons instruct the server to drop the visitor's IP before persisting. |
Consent.onChange | (handler) → unsubscribe | Subscribe to consent changes; returns an unsubscribe function. |
Consent.syncThirdPartyTags | () | Re-push the current state into Google Consent Mode v2, the GTM dataLayer, and Meta Pixel. Useful for late-loading tags. |
Consent.EVENT_NAME | string | The event name: 'mediaos:consentchange'. |
Global Privacy Control (GPC)
When the browser asserts navigator.globalPrivacyControl, the consent manager treats it as a legally binding CPRA opt-out: advertising and saleOrShare are forced to denied and cannot be overridden — even by GrantConsent(). First-party analytics may still be explicitly granted by the visitor. The current GPC state is available on the consent snapshot as the gpc boolean.
Notes
- Consent choices are persisted in namespaced
localStorageand survive page loads. - Opted-out visitors' analytics beacons are sent with a
noIpflag; the server dropsREMOTE_ADDRand postal data before persisting. - Pages listed in your MediaOS website settings as the privacy policy, terms, or GDPR URL are automatically excluded from paywall / access-rule processing.
- Consent Mode pushes work even if
gtag.js/ GTM / the Meta Pixel have not loaded yet — calls are queued through each platform's standard stub.
Advertising
Display MediaOS ad creatives on any page. Supports fallback content when no ad is available.
Description
Renders a MediaOS-served ad creative. Slot content is shown as a fallback when no MediaOS ad is available (e.g., a Google Ad Manager tag or a default image).
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
unit-ids | string | "" | optional | Comma-separated list of ad unit IDs to target. |
max-width | number | 2000 | optional | Maximum width of the rendered ad in pixels. |
max-height | number | 2000 | optional | Maximum height of the rendered ad in pixels. |
product-id | number | null | optional | Filter creatives by a specific product ID. |
advertiser-id | number | null | optional | Filter creatives by a specific advertiser ID. |
name | string | null | optional | Named identifier for this ad slot (for debugging). |
gam-slot | string | "" | optional | Google Ad Manager slot name for GAM passback integration. |
debug | boolean | false | optional | Enable debug overlay showing ad targeting information. |
Best of Voting
Embed the full "Best of" voting experience, winner displays, and quick-vote QR code generators.
Description
Renders the complete Best of voting ballot for the active voting campaign. Users must be logged in to vote. Automatically opens the registration modal if not authenticated.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | null | optional | Voting campaign ID. Defaults to the active campaign if omitted. |
Description
Displays a QR code generator tool for creating quick-vote links that can be printed or displayed at events.
Usage
No configurable props. The component reads the active voting campaign automatically.
Description
Displays the published Best of winners for a specific voting campaign, grouped by category. Supports year selection.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | — | required | The Best of voting campaign ID. |
Bookmarks
Allow logged-in users to bookmark pages or business directory profiles.
Description
A heart/bookmark icon that lets logged-in users save the current page or a specific content object. Defaults to bookmarking the current post page when no object-id is provided.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
object-id | number|string | current post | optional | The ID of the object to bookmark. Defaults to the current page post ID. |
object-type | string | WebsitePosts | optional | The type of object: WebsitePosts or MemberBusinessProfiles. |
for-expo | boolean | false | optional | Enable expo-specific bookmark behavior. |
Description
Displays all of the current user's saved bookmarks in a list view. Requires the user to be logged in.
Usage
No configurable props.
Classifieds
Description
Displays a classified ads listing with month/year browsing. Content is filtered by the MediaOS website configuration.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | null | optional | Optional classifieds section ID to filter results. |
Content
Embed article feeds, individual content tiles, knowledge bases, content submission forms, and registration walls.
Description
Renders a filterable list of content/articles from a MediaOS website or specific categories. Includes category navigation, pagination, and optional images.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
category-ids | string | null | optional | Comma-separated list of category IDs to filter by. |
website-id | string | null | optional | MediaOS website ID to pull content from. |
show-image | string | "false" | optional | Set to "true" to display featured images. |
image-position | string | "left" | optional | Position of the image: left or top. |
newsfeed-ids | string | "" | optional | Comma-separated newsfeed IDs to include. |
target | string | "_self" | optional | Link target attribute (_self or _blank). |
show-category-navigation | string | "true" | optional | Set to "false" to hide category filter tabs. |
open-in-new-tab | string | "false" | optional | Open article links in a new tab. |
show-ads | string | "false" | optional | Inject ad units between content items. |
max-excerpt-length | number | 200 | optional | Maximum character length of article excerpt preview. |
Description
Displays a single article/post as a card tile with title, image, and link. Fetches post data from the WordPress REST API.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
post-id | number | null | optional | WordPress post ID. Fetches title and image from WP REST API. |
set-title | string | null | optional | Manually set the tile title (overrides API fetch). |
set-url | string | null | optional | Manually set the tile link URL. |
set-image-url | string | null | optional | Manually set the tile image URL. |
Description
A form that allows users to submit content (such as press releases or news items) directly from your website. Supports optional payment gating.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
cost | number | — | optional | If set, user must pay this amount before submitting. |
category-id | number | — | optional | Pre-assign submissions to a specific content category. |
type | string | false | optional | Content type identifier for the submission. |
business-profile-id | number | null | optional | Associate the submission with a business directory profile. |
Description
Displays a registration prompt that gates access to content. Reads the current page's post ID from the global store and checks registration rules configured in MediaOS.
Usage
No configurable props. The component reads the current post ID from the mediaos:postid meta tag automatically.
Description
Renders a full knowledge base UI with category navigation, search, and article display. Suitable for help centers and documentation portals.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
website-id | string | null | optional | MediaOS website ID to pull knowledge base content from. |
category-ids | string | null | optional | Comma-separated list of category IDs to include. |
post-types | string | null | optional | Comma-separated list of content post types to include. |
Business Directory
Full-featured business directory components — searchable listings, individual profiles, list views, and expo floor plans.
Description
Renders the full business directory with category tiles, search, map integration, and paginated business listings.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
height | string | "100%" | optional | CSS height of the directory container. |
product-id | number | null | optional | Filter directory to a specific product/tier. |
id | number | null | optional | Pre-select a business by ID on load. |
max-sub-categories | number | 3 | optional | Maximum number of sub-categories to display per category tile. |
map | boolean | true | optional | Set to false to hide the map view. |
Description
Displays the business directory filtered to a specific curated list of businesses, with optional map.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | — | required | The business list ID to display. |
height | string | "100%" | optional | CSS height of the container. |
map | boolean | true | optional | Set to false to hide the map. |
Description
Displays the home screen for all business lists — a grid of all configured curated business lists.
Usage
No configurable props.
Description
Renders the full detail view of a single business directory profile including address, map, social links, hours, images, and related articles.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | — | required | The business profile ID to display. |
display-single-column | boolean | false | optional | Force single-column layout. |
Description
Displays businesses from a specific profile list as a scrollable card list with map integration.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number|string | — | required | The business profile list ID. |
height | string | "100%" | optional | CSS height of the container. |
Description
Embeds an interactive expo floor plan with clickable booth locations and an optional directory listing of exhibitors. Commonly used for trade shows and community events.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number|string | — | required | The expo/floor plan ID. |
height | string | "100%" | optional | CSS height of the floor plan container. |
hide-list | boolean | false | optional | Set to true to hide the side exhibitor directory list. |
Donations & Fundraising
Accept donations, track fundraising goals, and recognize donors on your website.
Description
A flexible fundraising widget supporting monthly, yearly, one-time, and custom donation amounts. Links to MediaOS offers for payment processing.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
monthly-offer-id | number | — | optional | MediaOS offer ID for a monthly recurring donation. |
yearly-offer-id | number | — | optional | MediaOS offer ID for an annual donation. |
one-time-offer-id | number | false | optional | MediaOS offer ID for a one-time donation. |
membership-label | string | "" | optional | Label text shown above the donation type selector. |
button-text | string | "Support Us" | optional | Call-to-action button text. |
amounts | array | [20,40,100,120,220,320] | optional | Preset dollar amounts shown as quick-select buttons. |
Description
Displays an animated progress bar showing progress toward a fundraising goal for the current month or a custom time period.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | — | optional | Donation goal configuration ID. |
target | number | 0 | optional | Dollar amount fundraising target. |
type | string | "month" | optional | Time period for the goal: month or year. |
color | string | primary color | optional | CSS color for the progress bar fill. |
Description
Displays a grid of donor names pulled from a MediaOS donation campaign. Useful for recognition pages and thank-you walls.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | string | "" | optional | Donation campaign or offer ID to pull donors from. |
columns | number | 4 | optional | Number of columns to split the donor names into. |
E-Commerce
Sell memberships, products, and events directly from your website with MediaOS checkout components.
Description
Displays a grid of purchasable offers from MediaOS — memberships, events, digital products, or physical products.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
show-digital-products | boolean | false | optional | Include digital product offers. |
show-events | boolean | false | optional | Include event ticket offers. |
show-memberships | boolean | false | optional | Include membership/subscription offers. |
show-physical-products | boolean | false | optional | Include physical product offers. |
go-to-checkout | boolean | false | optional | Immediately navigate to checkout after adding to cart. |
limit | number | 10 | optional | Maximum number of offers to display. |
button-label | string | "Add to Cart" | optional | Text for the add-to-cart button on each tile. |
membership-type-id | number | null | optional | Filter to a specific membership type ID. |
Description
Renders the full MediaOS checkout experience including cart review, address entry, payment, and order confirmation. Place this on your dedicated checkout page.
Usage
No configurable props. The cart contents are managed globally via the MediaOS cart store.
Description
A compact shopping cart icon with item count badge. Click to open a mini cart dropdown. Designed to be placed in a navigation bar.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
height | number | 40 | optional | Height of the icon in pixels; adjusts internal padding automatically. |
icon-only | boolean | false | optional | Show only the icon without the item count badge. |
Description
A configurable add-to-cart button for a specific MediaOS offer. Can display as a button, text link, or show the item price as its label.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
offer-id | number | — | required | The MediaOS offer ID to add to the cart. |
label | string | "Add to Cart" | optional | Button label text. |
display-type | string | "button" | optional | Render as button or text link. |
go-to-checkout | boolean | null | optional | If true, navigates directly to the checkout page after adding. |
price-as-label | boolean | null | optional | Replace the button label with the offer price. |
button-color | string | null | optional | CSS background color of the button. |
text-color | string | null | optional | CSS text color of the button. |
size | string | null | optional | Button size: sm, md, or lg. |
show-quantity | boolean | false | optional | Show a quantity selector next to the button. |
Description
A streamlined one-page subscription checkout flow. Displays available membership offers and the checkout in a single view. Pass a form-id to include a custom form step in the checkout flow.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
form-id | string | null | optional | Optional MediaOS form ID to embed within the checkout flow. |
Events
Description
Displays a full interactive calendar of events from MediaOS. Supports month/list views and event detail popups. Set a height via inline styles for best results.
Usage
No configurable props. Events are automatically loaded from the configured MediaOS website.
Forms
Description
Renders any form built in the MediaOS form builder. Supports redirect-on-submit, pre-filling fields via object-id, and optional payment steps.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | null | required | The MediaOS form ID to render. |
redirect-url | string | null | optional | URL to redirect to after the form is successfully submitted. |
object-id | number | null | optional | Pre-fill form fields from an existing MediaOS object (e.g., a business profile). |
Forum & Comments
Add community discussion features — article comments, full forum home, and group pages.
Description
Displays a threaded list of comments for a specific post or group, with the ability to post new comments (requires login).
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
post-id | number | — | optional | WordPress/MediaOS post ID to load comments for. |
group-id | number | — | optional | Group ID for forum/group discussions. |
contact-id | number | — | optional | Filter comments by a specific contact/author. |
is-forum | boolean | — | optional | Enable forum-specific display and UI. |
can-new-post | boolean | true | optional | Show the "New Post" / "New Comment" compose area. |
Description
Lightweight comments component for embedding below articles. Reads the current post ID from the page meta tag automatically when no comment-id is specified.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
comment-id | number | null | optional | Load a specific comment thread by ID. |
group-id | number | null | optional | Scope to a specific group. |
show-comments | boolean | false | optional | Expand the comment thread by default. |
Description
The complete community forum home — includes tabbed navigation for news, groups, members, and newsletter management.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
default-tab | string | "news" | optional | Tab shown on load: news, groups, members, or newsletters. |
Description
Displays a directory of community groups that users can browse and join. Requires login to join a group.
Usage
No configurable props.
Newsletters
Subscribe visitors, let users manage their subscriptions, embed inline subscribe forms within articles, and browse newsletter archives.
Description
A compact sign-up form for newsletter subscriptions. Optionally auto-subscribes to specific newsletter IDs and supports email verification bypass for trusted contexts.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
redirect-url | string | null | optional | URL to redirect the visitor to after successful subscription. |
newsletter-ids | string | null | optional | Comma-separated newsletter IDs to auto-subscribe the user to. |
skip-verify | boolean | false | optional | Skip the email confirmation step (reduces spam protection). |
skip-name | boolean | false | optional | Hide the first/last name fields (email only). |
sso-enabled | boolean | true | optional | Show SSO (Google, etc.) sign-in options in the form. |
Description
Automatically injects a newsletter subscribe form after the first quarter of an article's paragraphs. The form only shows to non-logged-in users. Point it at your article container using article-id or article-class.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
article-id | string | — | optional | HTML id of the article container element. |
article-class | string | — | optional | CSS class of the article container element (alternative to article-id). |
title | string | "Subscribe to our Newsletter!" | optional | Heading text displayed on the inline form. |
text | string | "We promise not to spam you." | optional | Sub-heading / description text on the form. |
redirect-url | string | null | optional | URL to redirect after subscribing. |
newsletter-ids | string | null | optional | Comma-separated newsletter IDs to subscribe to. |
skip-verify | boolean | false | optional | Skip the email confirmation step. |
Description
Allows a logged-in user to view and manage their newsletter subscription preferences — subscribing or unsubscribing from individual newsletters.
Usage
No configurable props. Subscription state is loaded from the logged-in user's profile.
Description
Displays a browsable archive of past newsletter editions, grouped by year. Supports viewing individual newsletter HTML directly in the component.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | null | optional | Filter to a specific newsletter by ID. |
start-year | number | current year | optional | The earliest year to display in the archive. |
News Bites
Description
Displays a multi-column feed of short-form "news bite" posts. Supports category filtering, image display, and opening articles in a new tab.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
columns | number | 1 | optional | Number of columns to display. |
items-per-column | number | 5 | optional | Number of news bites per column. |
category-ids | array | [] | optional | Array of category IDs to filter bites. |
show-images | boolean | true | optional | Display thumbnail images with each bite. |
show-date | boolean | true | optional | Show the published date on each bite. |
business-profile-id | string | null | optional | Filter bites by a specific business directory profile. |
open-in-new-tab | boolean | false | optional | Open article links in a new browser tab. |
Paywall
Control content access with metered paywalls, landing pages, and page-view counters.
Description
Renders a MediaOS-configured paywall landing page. Supports template variables for dynamic page view counts ({{pageViewsLeft}}, {{totalPageViews}}, {{pageViewsUsed}}).
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | — | required | The MediaOS landing page ID to display. |
page-views-left | number | null | optional | Remaining free page views — injected into template variables. |
total-page-views | number | null | optional | Total allowed free page views — injected into template variables. |
Description
Shows the current user's remaining free page views in a compact nav-bar-friendly widget. Designed to be placed inline in your site header.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
height | number | 40 | optional | Height of the widget in pixels (matches nav bar height). |
Perks
Description
Displays the member perks catalog — discounts and benefits provided by local businesses to your site's members.
Usage
No configurable props. Perks are loaded from the MediaOS account configuration.
Polls
Description
Embeds a single-question poll with real-time results. Requires the user to be logged in to vote. Supports post-vote redirect or a landing page overlay.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | number | "" | optional | The MediaOS poll ID. If omitted, options must be provided directly. |
title | string | "" | optional | Poll question / heading text. |
sub-title | string | "" | optional | Sub-heading text shown below the question. |
redirect-url | string | "" | optional | Redirect the user here after voting. |
display-landing-page-id | number | "" | optional | Show a MediaOS landing page after voting instead of redirecting. |
options | string | "" | optional | URL-encoded JSON array of poll option objects (used when not loading from a saved poll ID). |
Revenue Tools
Description
Renders a sponsor logo grid organized by sponsorship tier level. Pulls sponsor data from a MediaOS product configuration.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
product-id | number | 1 | required | The MediaOS product ID for the sponsorship tiers. |
color | string | "#000000" | optional | Text color used in the sponsor display. |
Support
Description
A collapsible chat widget tied to a MediaOS support ticket. Allows users to send messages and receive replies in real time. Polls for new messages automatically.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
id | string | — | required | The support ticket ID to load the chat for. |
User / Authentication
Login, registration, SSO, and user menu components for adding authentication to any page.
Description
A full login form with email/password fields, forgot-password flow, and SSO options. Can be embedded on a dedicated login page.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
reload | boolean | false | optional | If true, reloads the current page after a successful login. |
Description
A full registration form that creates a new MediaOS contact. Includes name, email, password fields, and SSO options. Automatically subscribes the user to the configured newsletter if set in account settings.
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
label | string | "Register" | optional | Label for the submit button. |
Description
Renders configured SSO provider buttons (Google, Microsoft, LinkedIn) based on your MediaOS account settings. Only shows buttons for providers that have been configured. To log in a user from your own system, use window.MediaOS.UserSsoJwt(jwt).
Usage
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
columns | string | null | optional | Maximum number of SSO button columns. Auto-adjusts to fit available providers. |