FOR WEBSITE OWNERS AND DEVELOPERS
Embed the circle.
Add the same shared circle to your website and style it for your audience. Choose a ready-made iframe or let your website control the colors and theme. No API key or OAuth setup is needed.
Open the theme builder ↗1. Quick start: paste an iframe
- Open the theme builder and choose a starter theme.
- Adjust the colors, typography and shape.
- Click Copy embed code and paste it into your website’s HTML or embed block.
<iframe
src="https://socialmediamarketingcircle.com/embed?background=ffffff&text=202738&accent=613bea&surface=f5f6fa&muted=596174"
title="Social Media Marketing Circle member offers"
width="100%"
height="760"
style="border:0;border-radius:12px"
loading="lazy"
></iframe>The embed is responsive to its container. Change the height to suit the placement; longer catalogues scroll inside the iframe. Listings update automatically. To edit an existing theme, use the embed’s Try it yourself link.
2. Let your website control the theme
Choose Copy website-controlled embed in the builder, or start with this example. The loader creates the iframe inside your container and reads its --circle-* CSS variables.
<style>
.my-circle {
--circle-background: var(--page-background, #ffffff);
--circle-surface: #f5f6fa;
--circle-text: #202738;
--circle-heading: #111827;
--circle-muted: #596174;
--circle-link: #613bea;
--circle-button-background: var(--brand-primary, #613bea);
--circle-button-text: #ffffff;
--circle-button-border: #613bea;
--circle-button-hover-background: #4624ba;
--circle-button-hover-text: #ffffff;
--circle-button-hover-border: #4624ba;
--circle-radius: 12px;
}
/* Match this selector to your site's dark-mode class. */
.dark .my-circle {
--circle-background: #111510;
--circle-surface: #182016;
--circle-text: #f2f0e9;
--circle-heading: #f2f0e9;
--circle-muted: #a7aaa4;
--circle-link: #d2ef78;
--circle-button-background: #d2ef78;
--circle-button-text: #182013;
--circle-button-border: #d2ef78;
--circle-button-hover-background: #e4ff94;
--circle-button-hover-text: #111510;
--circle-button-hover-border: #e4ff94;
}
</style>
<div class="my-circle" id="member-circle" data-circle-embed></div>
<script defer src="https://socialmediamarketingcircle.com/circle-embed.js"></script>Replace the values with your brand colors, or connect them to existing site variables such as --brand-primary. Put the CSS in your own stylesheet if preferred. Backgrounds, cards and buttons are independent, so you can theme each one.
When your site toggles a class or theme attribute on the container or one of its ancestors, the embed updates without reloading. It also refreshes when the operating system’s light/dark preference changes, so CSS using prefers-color-scheme is supported. Define the desired colors in your CSS; the loader reads those values.
Each container can have a different theme. Use a different class or ID for each placement. Containers added after the page loads can call mount() or scan().
3. JavaScript controls
Once the loader has loaded, get a controller for a container. Calling mount() again returns the existing controller, so it does not duplicate the iframe.
// Run after circle-embed.js has loaded.
const circle = window.SocialMediaMarketingCircle.mount("#member-circle");
circle.setTheme({
background: "#111510",
surface: "#182016",
text: "#f2f0e9",
heading: "#f2f0e9",
buttonBackground: "#d2ef78",
buttonText: "#182013",
radius: 16,
});
// Let CSS control this value again.
circle.setTheme({ buttonBackground: null });
// Reread styles after other stylesheet changes.
circle.refreshTheme();
// On component unmount or removal:
// circle.destroy();| Method or property | Use |
|---|---|
mount(target, options) | Target a CSS selector or HTML element. A new mount accepts { theme: { ... }, height: 760 }. To change an existing mount, use its controller. |
setTheme(patch) | Update only the supplied fields. Set a field to null to restore its CSS/default value. |
refreshTheme() | Reread styles after other stylesheet changes, such as loading a new CSS file. |
destroy() | Remove the iframe and disconnect listeners. Use this in SPA component cleanup. |
iframe | The iframe element, for example to adjust its height. |
scan() | Available on window.SocialMediaMarketingCircle. Mount all unmounted [data-circle-embed] containers. |
Theme precedence is defaults → host CSS → container JSON → JavaScript overrides. Optional data-circle-theme on the container accepts a JSON object with the same JavaScript field names.
4. All theme settings
CSS variables use kebab case; JavaScript and URL parameters use camel case. For example, buttonHoverBackground maps to --circle-button-hover-background.
Host CSS supports normal CSS colors, including hex, RGB, HSL and references to your existing variables. Direct embed URLs accept six or eight hexadecimal digits without #. The last two digits control opacity. The builder accepts hex input with # and generates the URL for you.
Backgrounds and text
| Setting | CSS variable | JavaScript / URL field | Default |
|---|---|---|---|
| Background color | --circle-background | background | #111510 |
| Card background | --circle-surface | surface | #182016 |
| Text color | --circle-text | text | #f2f0e9 |
| Heading color | --circle-heading | heading | #f2f0e9 |
| Secondary text color | --circle-muted | muted | #a7aaa4 |
| Accent color | --circle-accent | accent | #d2ef78 |
| Border color | --circle-border | border | #353e31 |
Main buttons
| Setting | CSS variable | JavaScript / URL field | Default |
|---|---|---|---|
| Button background | --circle-button-background | buttonBackground | #d2ef78 |
| Button text | --circle-button-text | buttonText | #182013 |
| Button border | --circle-button-border | buttonBorder | #d2ef78 |
| Button hover background | --circle-button-hover-background | buttonHoverBackground | #e4ff94 |
| Button hover text | --circle-button-hover-text | buttonHoverText | #111510 |
| Button hover border | --circle-button-hover-border | buttonHoverBorder | #e4ff94 |
Secondary buttons
| Setting | CSS variable | JavaScript / URL field | Default |
|---|---|---|---|
| Secondary button background | --circle-secondary-background | secondaryBackground | #111510 |
| Secondary button text | --circle-secondary-text | secondaryText | #f2f0e9 |
| Secondary button border | --circle-secondary-border | secondaryBorder | #65705e |
| Secondary button hover background | --circle-secondary-hover-background | secondaryHoverBackground | #263120 |
| Secondary button hover text | --circle-secondary-hover-text | secondaryHoverText | #ffffff |
| Secondary button hover border | --circle-secondary-hover-border | secondaryHoverBorder | #d2ef78 |
Links and focus
| Setting | CSS variable | JavaScript / URL field | Default |
|---|---|---|---|
| Link color | --circle-link | link | #d2ef78 |
| Link hover color | --circle-link-hover | linkHover | #ecffb3 |
| Focus ring color | --circle-focus | focus | #d2ef78 |
| Footer color | --circle-footer-text | footerText | #a7aaa4 |
Discount codes and notices
| Setting | CSS variable | JavaScript / URL field | Default |
|---|---|---|---|
| Code background | --circle-code-background | codeBackground | #202b17 |
| Code text | --circle-code-text | codeText | #d2ef78 |
| Code border | --circle-code-border | codeBorder | #9bb456 |
| Notice background | --circle-notice-background | noticeBackground | #202b17 |
| Notice text | --circle-notice-text | noticeText | #d2ef78 |
| Notice border | --circle-notice-border | noticeBorder | #728544 |
| Logo background | --circle-logo-background | logoBackground | #ffffff |
Typography, shape and transparency
| CSS variable | JavaScript / URL field | Accepted values | Default |
|---|---|---|---|
--circle-font | font | sans, serif or mono | sans |
--circle-font-size | fontSize | 12–20px | 15 |
--circle-radius | radius | 0–32px | 8 |
--circle-border-width | borderWidth | 0–4px | 1 |
--circle-spacing | spacing | 8–40px | 20 |
--circle-transparent | transparent | true or false | false |
Numeric CSS values may include px. JavaScript may use numbers. URL values use whole numbers without units. A transparent page background leaves each card’s surface color intact; use an eight-digit card color if you also want transparent cards.
5. How member access works
Brand profiles are public. Clicking an offer opens the circle in a secure tab, keeping the host’s current theme. Members sign in with TCM and must have an attached active customer and a current subscription to reveal a valid code.
This works without third-party sign-in cookies inside the iframe. Hosting sites control presentation; they do not receive account details or secret codes through the loader. No host-side login integration is required.
6. Troubleshooting
- The embed is blank
- Use an HTTPS website. Check that your website builder permits iframes and that your Content Security Policy allows
https://socialmediamarketingcircle.cominframe-src. - The website-controlled version does not appear
- Allow the same origin in your existing
script-srcpolicy and confirm thatcircle-embed.jsloads. If your platform strips scripts, use the regular iframe option. Put CSS in an approved stylesheet if inline styles are restricted. - A CSS change is not showing
- Set the variable on the container or an ancestor. Check whether container JSON or a JavaScript override takes priority. Use
setTheme({ fieldName: null })to clear an override, thenrefreshTheme()if needed. - The JavaScript API is undefined
- Run your integration after the deferred loader has loaded, for example from a
DOMContentLoadedhandler. For an asynchronously inserted script, use itsloadevent. - No brand offers are visible yet
- The live catalogue fills as founding brands join. The builder’s style sample is a design preview, not a redeemable offer.
Need help with a placement? Contact Amelia.