Publish an experience in Experience Manager and it’s live on your site. No code changes required for standard web pages — the Marfeel SDK handles delivery automatically.
Verify SDK installation
Experiences require the Marfeel SDK (marfeel-sdk) on your site. To confirm it’s installed, open your browser’s developer console on any page and check for the window.marfeel object.
If the SDK is not installed, contact your Marfeel account team or refer to the SDK installation documentation.
How experiences load
The SDK delivers experiences in two stages depending on how they’re configured:
| Stage | When it fires | What it delivers |
|---|---|---|
| Pre-targeting | Immediately when the SDK loads | Experiences that don’t require a server-side targeting evaluation. These are bundled directly in the SDK and appear instantly |
| Post-targeting | Seconds after page load | Experiences that use targeting dimensions requiring server evaluation (e.g., loyalty segment, geographic location). The SDK makes a request to experience.mrf.io/json/experiences and delivers the result |
You don’t choose between these stages — the system determines the stage automatically based on the targeting dimensions you configure. If all your targeting can be resolved client-side, the experience is pre-targeted. If any dimension requires server evaluation, it’s post-targeted.
URL resolution
The SDK uses the page’s canonical URL (link rel="canonical" in the page head) to match experiences to the current page. All targeting and content rules are evaluated against this URL.
If you previously tracked a manual page navigation using the trackNewPage() method, that URL takes precedence over the canonical URL.
Important: If experiences appear on the wrong page or don’t appear at all, check your canonical URL first. A missing or incorrect rel=“canonical” tag is the most common cause.
Single Page Applications (SPAs)
On standard browser navigations (full page loads), experiences reload automatically for each new page.
For Single Page Applications (SPAs) or Progressive Web Apps (PWAs) where navigation occurs without a full page refresh, you need to manually trigger experience reload after each route change:
window.marfeel.cmd.push(['experiences', (experiences) => {
experiences.triggerExperiences();
}]);
Call this after every SPA route transition. The SDK re-evaluates targeting and delivers experiences for the new page.
Important: Only use triggerExperiences() for dynamically loaded pages. Experiences on native browser navigations are loaded automatically. Calling it on a standard page load will result in duplicate experience delivery.
Going deeper
- Experience Manager Overview: The four-tab editor walkthrough.
- Delivery & Scheduling
- Triggers
- Targeting
- A/B Testing
- Blueprints
- Inline: DOM injection, CSS selector placement, and visual element selector.
- Popups: Modal vs contextual modes, position, triggers, and orchestration.
- Flowcards: Isolated AMP rendering, snap points, card icons, and browser history integration.
- Tag Experiences: SDK configuration for tracking, integrations, and third-party tools.
- Recommender: Configure recommendation engines and layouts.
- Page Transformations
- Testing and Troubleshooting: Preview, live test, and debug your experiences.
- Web Activation: How the SDK delivers experiences on your site.
- AMP Activation: Run Flowcards on AMP pages.