JustEmbed Documentation
Complete guide to integrating and customizing JustEmbed social feed widgets on your website.
Quick Start
Get a social feed running on your website in under 5 minutes.
1. Create a Feed
Sign up at the dashboard, connect your social account, and create a new feed. You'll receive an API key for each feed.
2. Add the Widget
Paste this code where you want the feed to appear:
<div class="justembed-feed"
data-api-key="YOUR_API_KEY">
</div>
<script src="https://cdn.justembed.app/widget/justembed.js" async></script>
That's it! The widget loads asynchronously and renders inside a Shadow DOM for complete CSS isolation.
Installation
Script Tag (Recommended)
Add the script tag before the closing
</body> tag. The async attribute ensures it doesn't block page
rendering.
<script src="https://cdn.justembed.app/widget/justembed.js" async></script>
NPM Package
npm install @justembed/widget
import { init } from '@justembed/widget';
init();
<div class="justembed-feed"> elements on the page. You can also use the
JavaScript API for manual control.
Configuration
Configure feeds through the dashboard. The widget automatically fetches all display settings from the server.
data-api-key is required. All
layout, theme, and behavior settings are now configured in the dashboard and applied
automatically.
| Attribute | Type | Default | Description |
|---|---|---|---|
data-api-key |
string | required | Your feed API key from the dashboard |
data-api-url |
string | https://api.justembed.app |
API base URL (for self-hosted setups) |
Dashboard Configuration
All display settings are configured in the dashboard under Feed Settings → Style. These settings are automatically applied to the widget:
| Setting | Type | Default | Description |
|---|---|---|---|
| Layout | enum | grid |
Layout type: grid,
masonry, carousel, reviews
|
| Columns | number | 3 |
Number of columns (grid/masonry) |
| Gap | number | 16 |
Spacing between items (px) |
| Theme | enum | light |
Color theme: light,
dark
|
| Language | enum | en |
Widget locale: en,
it, es, fr, de, pt
|
| Privacy Mode | boolean | true |
Proxy media for GDPR compliance |
| Show Captions | boolean | false |
Display post captions |
| Show Likes | boolean | false |
Display like counts |
| Show Comments | boolean | false |
Display comment counts |
| Shoppable Links | boolean | true |
Show shopping badges and links |
Layouts
Grid
Uniform grid of posts. Best for Instagram-style photo feeds. Configure columns in the dashboard.
<div class="justembed-feed" data-api-key="KEY"></div>
Masonry
Pinterest-style layout that preserves original aspect ratios. Great for mixed content with varying heights.
<div class="justembed-feed" data-api-key="KEY"></div>
Carousel
Horizontal scrolling carousel with navigation arrows. Ideal for featured content or testimonials.
<div class="justembed-feed" data-api-key="KEY"></div>
JavaScript API
The widget exposes a global window.JustEmbed API for
programmatic control:
// Initialize all feed containers on the page
window.JustEmbed.init();
// Destroy all widget instances and clean up
window.JustEmbed.destroy();
// Refresh all feeds (re-fetch data from server)
window.JustEmbed.refresh();
init() on
page load. Use the API only if you need manual control (e.g., after dynamically adding feed
containers).
Localization
The widget supports 6 languages. Configure the language in the
dashboard or via the data-lang attribute:
<div class="justembed-feed" data-api-key="KEY" data-lang="fr"></div>
| Code | Language |
|---|---|
en |
English (default) |
it |
Italian |
es |
Spanish |
fr |
French |
de |
German |
pt |
Portuguese |
If data-lang is not set, the widget detects the
language from the page's lang attribute or the browser's language setting.
Authentication
The API uses Bearer token authentication. Obtain a session token via magic link login:
POST /api/v1/auth/magic-link
Content-Type: application/json
{ "email": "you@example.com" }
Verify the token from the email link:
GET /api/v1/auth/magic-link/verify?token=TOKEN
Use the returned session token in subsequent requests:
Authorization: Bearer SESSION_TOKEN
Feeds API
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/feeds |
List all feeds |
POST |
/api/v1/feeds |
Create a new feed |
GET |
/api/v1/feeds/:id |
Get feed details |
PUT |
/api/v1/feeds/:id |
Update feed settings |
DELETE |
/api/v1/feeds/:id |
Delete a feed |
POST |
/api/v1/feeds/:id/regenerate-key |
Regenerate API key |
Create Feed Example
POST /api/v1/feeds
Authorization: Bearer TOKEN
Content-Type: application/json
{
"name": "My Instagram Feed",
"platform": "instagram",
"sourceUrl": "https://instagram.com/mybusiness",
"layout_type": "grid",
"settings_json": {
"columns": 3
}
}
Response:
{
"data": {
"id": "01JXYZ...",
"name": "My Instagram Feed",
"apiKey": "feed_abc123...",
"platform": "instagram",
...
}
}
Embed API
The embed endpoint is used by the widget to fetch feed data. No authentication required — uses the feed's API key.
GET /api/v1/embed/:apiKey
Returns cached feed JSON from KV with stale fallback for maximum performance.
Analytics API
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/feeds/:id/analytics |
Summary + comparison |
GET |
/api/v1/feeds/:id/analytics/daily |
Daily time series |
GET |
/api/v1/feeds/:id/analytics/export |
CSV download |
POST |
/api/v1/track |
Track widget events |
WordPress Integration
Add the widget code to any WordPress page or post using the Custom HTML block:
- Edit your page in the WordPress block editor
- Add a Custom HTML block
- Paste the widget code
- Publish or update the page
footer.php once, and then use just the <div> on each
page.
Shopify Integration
For Shopify stores, add the widget to a custom Liquid section:
- Go to Online Store → Themes → Edit code
- Create a new section or edit an existing one
- Paste the widget HTML and script
- Add the section to your desired page template
GDPR & Privacy
JustEmbed offers a privacy-safe mode that ensures GDPR compliance:
<div class="justembed-feed" data-api-key="KEY"></div>
Privacy mode is enabled by default. In this mode:
- All media is proxied through JustEmbed servers (no direct requests to social platforms)
- No cookies or tracking pixels from third parties
- Analytics use anonymous, aggregated data only
Troubleshooting
Feed shows "No posts to display"
This usually means the feed hasn't been synced yet. Feeds sync automatically every 30 minutes. You can trigger a manual sync from the dashboard.
Widget styles conflict with my site
The widget renders inside a Shadow DOM, so styles are fully isolated. If you see conflicts, ensure you're not using JavaScript that modifies Shadow DOM content.
Images don't load
If using privacy mode, ensure your server can reach the JustEmbed proxy endpoint. Check browser console for network errors.
Widget doesn't appear on mobile
Ensure the container element has sufficient width. The widget needs at least 280px width to render. Check for CSS that might be hiding the container.