scrollFibr Script

The Fibr Script is what connects your website to Fibr. It's a small code snippet that you add once, and it enables everything Fibr does: experiments, personalization, tracking, and real-time optimization.

Without it, Fibr can't see your visitors or deliver dynamic experiences. With it, your site can adapt to every campaign, audience, and condition automatically.


How It Works

When someone visits your site, the Fibr Script runs instantly and does three things:

  1. Identifies the visitor. It checks who they are based on your configured rules: which ad they clicked, what audience segment they belong to, whether they're new or returning, their location, and more.

  2. Finds the right experience. If the visitor matches any of your active experiments or personalization campaigns, Fibr selects the appropriate variant.

  3. Delivers it immediately. The experience loads client-side during page render. Your visitor sees the personalized version without any flicker, delay, or visible swap.

This all happens in milliseconds. Your site adapts dynamically without requiring any additional deployments or engineering work.


Installation Options

Choose the method that fits your setup:

Cover

Add Fibr SDK to your Website

Cover

Connect with Shopify Store


Best Practices for Installation

  • Place it in the <head> tag The script needs to load early in the page lifecycle to work correctly. Add it inside the <head> section of your HTML.

  • Put it above other scripts Position the Fibr Script at the top of your <head>, before analytics tags, tracking pixels, or other third-party scripts. This ensures Fibr initializes first and can deliver the right experience before anything else runs.

  • Avoid script conflicts If you have multiple scripts that modify page content or load asynchronously, they can interfere with Fibr's timing. Keep your <head> clean and test after adding new scripts.

  • Whitelist all your domains In your Fibr workspace, add every domain and subdomain where the script will run. You can apply it site-wide or restrict it to specific URLs if you want tighter control over where campaigns run.

  • Validate before launching campaigns Before you create experiments or personalization campaigns, confirm the script is working:

    • Go to Settings → Setup → Validate in your Fibr Dashboard

    • Enter your URL and click Check

    • You'll see a confirmation if the script is firing correctly

This takes 30 seconds and saves you from troubleshooting later.


What's Next?

Once the script is installed and validated:

  1. Connect Google Analytics(GA4) to pull performance data into Fibr

  2. Link your ad accounts to enable ad personalization

Last updated