Skip to main content

Embedding the Boundary Advisor™

Add the Deep Fathom Boundary Advisor™ — an interactive CMMC scoping and boundary planning tool — to your website with a simple code snippet. This guide covers the standard embed, configuration options, and advanced patterns.

Basic embed

The simplest integration requires just two elements: a container and a script.

<!-- Container: where the Boundary Advisor appears -->
<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
></div>

<!-- Loader: initializes the Boundary Advisor -->
<script type="module" src="https://cdn.deepfathom.ai/onramp-kit/v1/widget.mjs"></script>

Place the container <div> wherever you want the Boundary Advisor™ to appear on your page. The script can go in the <head> or at the end of <body>—it loads asynchronously and won't block your page. Keep the SDK and iframe paths on the same version line (for example, v1/widget.mjs with v1/hosted/index.html).

Required attributes

AttributeDescription
data-deep-fathom-onrampMarks this element as the Boundary Advisor container
data-partner-idYour unique partner identifier for attribution
data-iframe-src or data-hostIframe target URL or host prefix for the hosted Boundary Advisor
AttributeDescription
data-partner-nameYour organization name (shown to visitors)
data-iframe-srcFull iframe URL (recommended; version-pinned and explicit)

Use data-iframe-src when possible. Use data-host only if your host path resolves directory requests to index.html.

Partner branding

Display your logo and company name in the Boundary Advisor header with a "Powered by Deep Fathom" badge:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-branding-name="Acme Security"
data-branding-logo="https://acme.com/logo.svg"
data-branding-logo-dark="https://acme.com/logo-dark.svg"
data-branding-logo-height="32"
></div>

When partner branding is configured, the header displays:

  1. Your logo (or company name if no logo provided)
  2. "Deep Fathom Boundary Advisor™" product name
  3. "Powered by Deep Fathom" badge
AttributeRequiredDescription
data-branding-nameYes (for branding)Your company name (used as fallback if logo fails to load)
data-branding-logoNoURL to your logo image (SVG, PNG, or JPG). Must be HTTPS.
data-branding-logo-darkNoURL to dark mode variant of your logo
data-branding-logo-heightNoLogo height in pixels (16-48, default: 28)

Logo guidelines

  • Format: SVG recommended for crisp rendering at any size. PNG and JPG also supported.
  • Height: Keep logos between 16-48px tall. The width scales automatically.
  • Dark mode: Provide a data-branding-logo-dark variant if your logo doesn't work on dark backgrounds.
  • Security: Only HTTPS URLs are allowed. Data URLs and JavaScript URLs are blocked.

Name-only branding

If you don't have a logo, just provide your company name:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-branding-name="Acme Security Partners"
></div>

Your name will be displayed prominently in place of a logo.

Supporting older browsers

For maximum browser compatibility, include a fallback script for browsers that don't support ES modules:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-partner-name="Acme Security"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
></div>

<!-- Modern browsers use this -->
<script type="module" src="https://cdn.deepfathom.ai/onramp-kit/v1/widget.mjs"></script>

<!-- Older browsers (IE11, legacy Edge) use this instead -->
<script nomodule src="https://cdn.deepfathom.ai/onramp-kit/v1/widget.legacy.js"></script>

Modern browsers ignore the nomodule script; older browsers ignore type="module". This pattern ensures the Boundary Advisor works everywhere.

Configuration options

Attribution

Track where your leads come from with UTM parameters and referral codes:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-partner-name="Acme Security"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-referral-code="SPRING2025"
data-utm-source="partner-website"
data-utm-medium="embed"
data-utm-campaign="cmmc-assessment"
></div>

All attribution data flows through to the Deal Registration API and is included in onDealRegistered events, so you can track performance in your analytics and CRM.

AttributeDescription
data-referral-codeCustom code for campaigns or sales tracking
data-attribution-sourceOverride the default source identifier
data-utm-sourceUTM source parameter
data-utm-mediumUTM medium parameter
data-utm-campaignUTM campaign parameter
data-utm-contentUTM content parameter
data-utm-termUTM term parameter

Snapshots and sharing

Enable visitors to save and share their assessment progress:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-snapshot-endpoint="https://api.deepfathom.ai/snapshots"
></div>
AttributeDescription
data-snapshot-endpointAPI endpoint for saving assessment state (enables sharing and resume)
data-allow-url-piiSet to true to include company name in URL snapshots (default: redacted for privacy)

See the Snapshots reference for details on how sharing and resume work.

Rendering mode

The current SDK release renders via iframe mode:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-mode="iframe"
></div>
ModeDescription
iframeDefault. Renders in an isolated iframe for maximum compatibility and security isolation.
inlineReserved for future use. Currently logs a warning and falls back to iframe mode.

For most integrations, leave this unset.

Theme mode

Control how the SDK resolves theme values from CSS variables and color palettes:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-theme-mode="auto"
></div>

Supported values: auto, light, dark, partner, df. See the Theming guide for details.

Loading states

Enable a built-in loading placeholder while the iframe initializes:

<div
data-deep-fathom-onramp
data-partner-id="your-partner-id"
data-iframe-src="https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html"
data-loading
></div>

You can also provide a custom loading UI via the JavaScript API.

Versioning

The SDK follows semantic versioning. Choose a version strategy based on your needs:

URL patternBehavior
.../v1/widget.mjsLatest stable v1.x release (recommended)
.../v1.2.3/widget.mjsPinned to specific version (for reproducible deployments)
.../latest/widget.mjsLatest release including pre-releases (not recommended for production)

Pre-release versions (like v1.3.0-rc.1) don't update the v1 or latest aliases.

Programmatic initialization

For more control, initialize the Boundary Advisor with JavaScript instead of data attributes:

import { mount } from '@onramp-kit/sdk';

const handle = mount('#configurator-container', {
partnerId: 'your-partner-id',
partnerName: 'Acme Security',
iframeSrc: 'https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html',
snapshotEndpoint: 'https://api.deepfathom.ai/snapshots',
mode: 'iframe',
theme: { mode: 'auto' },
loading: true,

// Partner branding (displays your logo with "Powered by Deep Fathom")
branding: {
name: 'Acme Security',
logo: 'https://acme.com/logo.svg',
logoDark: 'https://acme.com/logo-dark.svg',
logoHeight: 32,
},

attribution: {
referralCode: 'SPRING2025',
utmSource: 'partner-website',
utmMedium: 'embed',
utmCampaign: 'cmmc-assessment',
},
allowUrlPii: false,

// Event handlers
onReady: () => {
console.log('Boundary Advisor loaded');
},
onError: (error) => {
console.error('Onramp Kit error:', error);
},
onDealRegistered: (payload) => {
console.log('Deal registered:', payload.dealId);
// Send to your CRM, analytics, etc.
},
onComplete: (payload) => {
console.log('Assessment completed:', payload.summary);
},
});

// Later: clean up when done
handle.destroy();

This approach is useful when you need to:

  • Set configuration dynamically based on user context
  • Initialize multiple Boundary Advisor instances on one page
  • Integrate with a JavaScript framework (React, Vue, etc.)

Preloading (optional)

If you want faster perceived load times, preload the iframe early and mount it later:

import { preload } from '@onramp-kit/sdk';

const pre = preload({
partnerId: 'your-partner-id',
iframeSrc: 'https://cdn.deepfathom.ai/onramp-kit/v1/hosted/index.html',
});

// Later, when the user clicks a CTA:
const handle = pre.mount('#configurator-container', { loading: true });

Security considerations

Content Security Policy (CSP)

If your site uses a Content Security Policy, add these directives:

script-src: https://cdn.deepfathom.ai
frame-src: https://cdn.deepfathom.ai
connect-src: https://api.deepfathom.ai https://go.deepfathom.ai

Iframe restrictions

If your site sets X-Frame-Options or frame-ancestors policies, ensure they don't block the Boundary Advisor's iframe. The iframe loads from your configured data-iframe-src (or data-host) origin.

If something doesn't load

Common issues and solutions:

SymptomLikely causeSolution
Blank space where Boundary Advisor should beScript blocked by CSPAdd CDN to script-src directive
"Refused to frame" error in consoleIframe blocked by policyAdd origin to frame-src directive
Boundary Advisor loads but events don't fireOrigin mismatchVerify data-iframe-src (or data-host) points to the expected iframe origin

See Browser support for detailed compatibility information.

All configuration attributes

AttributeRequiredDescription
data-deep-fathom-onrampYesMarks element as Boundary Advisor container
data-partner-idYesYour partner identifier
data-partner-nameRecommendedYour organization name
data-iframe-srcYes (or data-host)Full iframe URL (recommended)
data-hostYes (or data-iframe-src)Host/prefix used to build the iframe URL
data-branding-nameNoCompany name for header branding
data-branding-logoNoLogo URL for header branding (HTTPS only)
data-branding-logo-darkNoDark mode logo URL
data-branding-logo-heightNoLogo height in pixels (16-48)
data-snapshot-endpointFor sharingSnapshot API base URL
data-modeNoiframe (default). inline currently falls back to iframe
data-theme-modeNoTheme resolution mode (auto, light, dark, partner, df)
data-loadingNoShow built-in loading placeholder
data-referral-codeNoCampaign/sales tracking code
data-attribution-sourceNoOverride source identifier
data-utm-sourceNoUTM source
data-utm-mediumNoUTM medium
data-utm-campaignNoUTM campaign
data-utm-contentNoUTM content
data-utm-termNoUTM term
data-allow-url-piiNoInclude PII in URL snapshots (true/false)

Next steps