Skip to content
Installation

Where To Paste The Script

Paste your widget’s snippet once, just before the closing body tag, on every page where the widget should load. Here is where to find it and what to leave unchanged.

Every Flidu widget is installed with one script tag. This page covers where that tag belongs on your page and why, how many times to paste it, and what to leave untouched. For the full walkthrough from copying to checking, start with Install Flidu On Your Website.

Where To Find Your Snippet

In the dashboard, open Website Widgets, choose your website, and open the Install tab. The Install Widget card shows the snippet with a Copy button. The Overview tab also has an Install card whose View Install Snippet button takes you to the same place. If the website has more than one widget, select the widget first in the Website Widgets card on the Overview tab: the Install tab shows the snippet of the selected widget.

The snippet is a single script tag, and it has the same shape for every widget:

The Shape Of The Snippet (Copy Your Own From The Install Tab)
<script defer src="https://flidu.com/widget.js" data-widget="YOUR_WIDGET_KEY"></script>

The data-widget value is that widget’s own key; YOUR_WIDGET_KEY in the sample stands in for it. The key identifies one widget and it does not change. Always use Copy on the Install tab instead of typing the tag out, so the address and the key are exactly right. If you cannot find the tab, see I Cannot Find My Install Snippet.

One Snippet Per WidgetA widget that shows Contact, Ask AI, or both loads from its one snippet. Adding Ask AI to a widget that is already installed needs no second script. An AI Chatbot installed as Ask AI-only has a snippet of its own: the Get install code link, in the Connection section of the AI Chatbot’s Preview tab, opens the Install tab that holds it.

Paste It Before The Closing Body Tag

The Install tab says: “Paste this before the closing </body> tag of your website.” Use that position whenever you have the choice. When the script runs, it asks Flidu for the widget’s settings and then adds the widget to the page body. At the end of the body the rest of your page is already in place, so the script cannot run too early.

On a hand-built site, that means the shared footer or layout template, so the tag reaches every page. On a site builder, it means the area for site-wide footer or body-end code. Platform Placement Notes describes what to look for on common builders.

If You Can Only Add Code To The Head

The Install tab adds that the snippet “Also works inside the <head> section if needed.” Treat the head as the fallback for platforms that offer no body-end area, and confirm the result on the live page afterwards.

Paste It Once Per Page

Flidu ignores repeated copies of the same widget snippet from the same script origin while it is loading or already displayed. You still only need to paste it once. When a builder offers both a site-wide code area and a page-level one, use one of them for a given widget. Different widget snippets can load independently.

Two different widgets on one page are possible, because each has its own snippet, but each draws its own launcher. Put them in different corners, or give them rules that never show both on the same page. Create And Manage Multiple Widgets covers running more than one.

Every Page Or Only Some Pages

The snippet only does something on pages that carry it. That gives you two ways to decide where the widget appears:

  • Paste it site-wide and let rules decide. Put the snippet in your site-wide footer area, then use the widget’s Visibility & Targeting tab to choose devices and pages. Widget Visibility by Device is included from Website Widgets Starter and Page Targeting from Pro. See Show Widgets By Page Or Device.
  • Paste it only on certain pages. A widget made for one landing page or campaign can be pasted on that page alone. This placement works on every plan, because a page without the snippet never loads the widget. See Page-Specific Widgets For Campaigns.
Rules And Ask AIPage and device rules hide the Contact side of a widget. If the same widget also carries a published Ask AI, the launcher still appears on those pages and opens Ask AI. To keep a page completely free of the widget, leave the snippet off that page.

Paste It Unchanged

The script learns which widget to load from the data-widget attribute on its own tag, and it reaches Flidu through the address in that tag. So the tag has to arrive on your page as you copied it:

  • Keep it as one ordinary script tag. Do not remove, rename or edit the attribute.
  • Do not copy the script file to your own server or merge it into another file. A copy that loads from a different address, or without its own tag, cannot find your widget, and nothing appears.
  • If a tool on your site rewrites or combines script tags and the widget does not appear, paste the snippet directly into your site’s HTML or custom-code area instead.

Some snippets carry a data-site attribute instead of data-widget. That is the earlier form of the snippet. It keeps working and loads the website’s default widget, as long as that widget is published. For anything new, copy the current snippet from the Install tab.

After You Paste

  1. Save and publish your website, so the snippet is on the live site and not only in an editor or a draft.
  2. Open a page of the live site in your browser.
  3. Go back to the Install tab and click Verify Installation. Verify Your Installation explains each status.
Publish A Channel FirstA published widget shows its launcher even when no channel is live yet. Publish at least one channel before you add the snippet, so the launcher never opens to an empty panel.

From then on you do not touch the snippet again. Channels, appearance, targeting and Ask AI are managed in the dashboard, and published changes show the next time a page loads. If the launcher does not appear at all, see I Installed The Snippet But Nothing Happens.

Related
DocsInstall Flidu On Your WebsiteDocsPlatform Placement NotesDocsVerify Your InstallationHelpI Do Not Know Where To Paste The Snippet On My Website Builder
Still need a hand? Tell us what you are seeing and we will reply by email.Contact Us
Flidu

Accounts are not open yet

You can't create an account or sign in to Flidu yet. If you have a question, the Contact page reaches us.