← Social Media Marketing Circle

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

  1. Open the theme builder and choose a starter theme.
  2. Adjust the colors, typography and shape.
  3. Click Copy embed code and paste it into your website’s HTML or embed block.
Iframe HTML
<iframe
  src="https://socialmediamarketingcircle.com/embed?background=ffffff&amp;text=202738&amp;accent=613bea&amp;surface=f5f6fa&amp;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.

Website-controlled HTML and CSS
<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.

JavaScript theme updates
// 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 propertyUse
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.
iframeThe 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

SettingCSS variableJavaScript / URL fieldDefault
Background color--circle-backgroundbackground#111510
Card background--circle-surfacesurface#182016
Text color--circle-texttext#f2f0e9
Heading color--circle-headingheading#f2f0e9
Secondary text color--circle-mutedmuted#a7aaa4
Accent color--circle-accentaccent#d2ef78
Border color--circle-borderborder#353e31

Main buttons

SettingCSS variableJavaScript / URL fieldDefault
Button background--circle-button-backgroundbuttonBackground#d2ef78
Button text--circle-button-textbuttonText#182013
Button border--circle-button-borderbuttonBorder#d2ef78
Button hover background--circle-button-hover-backgroundbuttonHoverBackground#e4ff94
Button hover text--circle-button-hover-textbuttonHoverText#111510
Button hover border--circle-button-hover-borderbuttonHoverBorder#e4ff94

Secondary buttons

SettingCSS variableJavaScript / URL fieldDefault
Secondary button background--circle-secondary-backgroundsecondaryBackground#111510
Secondary button text--circle-secondary-textsecondaryText#f2f0e9
Secondary button border--circle-secondary-bordersecondaryBorder#65705e
Secondary button hover background--circle-secondary-hover-backgroundsecondaryHoverBackground#263120
Secondary button hover text--circle-secondary-hover-textsecondaryHoverText#ffffff
Secondary button hover border--circle-secondary-hover-bordersecondaryHoverBorder#d2ef78

Links and focus

SettingCSS variableJavaScript / URL fieldDefault
Link color--circle-linklink#d2ef78
Link hover color--circle-link-hoverlinkHover#ecffb3
Focus ring color--circle-focusfocus#d2ef78
Footer color--circle-footer-textfooterText#a7aaa4

Discount codes and notices

SettingCSS variableJavaScript / URL fieldDefault
Code background--circle-code-backgroundcodeBackground#202b17
Code text--circle-code-textcodeText#d2ef78
Code border--circle-code-bordercodeBorder#9bb456
Notice background--circle-notice-backgroundnoticeBackground#202b17
Notice text--circle-notice-textnoticeText#d2ef78
Notice border--circle-notice-bordernoticeBorder#728544
Logo background--circle-logo-backgroundlogoBackground#ffffff

Typography, shape and transparency

CSS variableJavaScript / URL fieldAccepted valuesDefault
--circle-fontfontsans, serif or monosans
--circle-font-sizefontSize12–20px15
--circle-radiusradius0–32px8
--circle-border-widthborderWidth0–4px1
--circle-spacingspacing8–40px20
--circle-transparenttransparenttrue or falsefalse

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.com in frame-src.
The website-controlled version does not appear
Allow the same origin in your existing script-src policy and confirm that circle-embed.js loads. 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, then refreshTheme() if needed.
The JavaScript API is undefined
Run your integration after the deferred loader has loaded, for example from a DOMContentLoaded handler. For an asynchronously inserted script, use its load event.
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.