Embed Guide
Embed Guide
Embed SkaelReach videos on any website using iframes. Each prospect has a unique token that loads their personalized video experience.
Installation
Replace {TOKEN} with the prospect token from the Create Prospect response.
<iframe
src="https://yourdomain.com/embed/{TOKEN}"
width="100%"
height="600"
frameborder="0"
allow="autoplay; fullscreen"
style="border: none; border-radius: 12px;"
></iframe>
Responsive Sizing
For a responsive embed that maintains a 16:9 aspect ratio:
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe
src="https://yourdomain.com/embed/{TOKEN}"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 12px;"
allow="autoplay; fullscreen"
></iframe>
</div>
Content Security Policy
If your site uses a Content Security Policy, add the embed domain to your frame-src directive:
Content-Security-Policy: frame-src https://yourdomain.com;
If you use a custom domain for embeds, whitelist that domain instead.
JavaScript API
Listening for Events
The embed player dispatches events to the parent window via postMessage:
window.addEventListener('message', function(event) {
if (event.data.type === 'skaelreach:event') {
console.log('Event:', event.data.eventType);
console.log('Metadata:', event.data.metadata);
}
});
Event types emitted:
| Event |
Description |
video_started |
Video playback began |
video_progress |
Milestone reached (metadata includes percent) |
video_paused |
Video was paused |
cta_clicked |
CTA button was clicked |
calendly_booked |
Calendly booking completed |
Programmatic Control
Send commands to the embed player:
const iframe = document.querySelector('iframe');
// Play video
iframe.contentWindow.postMessage({ type: 'skaelreach:play' }, '*');
// Pause video
iframe.contentWindow.postMessage({ type: 'skaelreach:pause' }, '*');
// Seek to specific time (seconds)
iframe.contentWindow.postMessage({ type: 'skaelreach:seek', time: 10 }, '*');
Custom Domains
For branded embed URLs, configure a custom domain on your campaign. This replaces the default domain in all prospect URLs:
https://video.yourcompany.com/abc123def456ghi789jkl
Custom domains require DNS configuration. See the domain setup page in your campaign settings.