FAQ

Need any help?

You will find most frequently asked questions below. Still having issues? Please contact us. Our technical staff loves to help you out.

Where do I place this script?

Best practice is to place the script within the opening and closing <head> tags.

What does this script do exactly?

FIU's servers do all the heavy lifting. This script simply asks FIU's servers if the current recipe or product page should be provided with buy buttons. And if so, where. The script then places these buttons.

Will this script slow my website down?

The script is executed asynchronously. Which means that other components on your page will continue to load and will never have to wait for this script to load. Furthermore, we do our utmost best to keep this script as small and fast as possible. That way, we are keeping your website fast.

How do I place a script like this one on my website?

There are multiple ways to place scripts on your website, but these depend on which CMS you are using. Therefore, we would like to refer you to the documentation of your CMS. Another option is to place the script through Google Tag Manager.

My consent tool labels the script as "unknownVendor" or blocks it. How do I fix that?

What's happening: Your consent tool decides per script host what may run. Either it does not know cdn.foodinfluencersunited.com, labels the script unknownVendor and blocks it for everyone, or it knows us but has filed us under marketing, so the script only runs for visitors who accept.

What to do: two steps, and the second one is the one that matters.

  1. Make your tool recognise us. Add Food Influencers United as a known service for the host cdn.foodinfluencersunited.com. Your tool may call this a custom vendor, a manual service, an allowlist or whitelisting a script; consentmanager, Real Cookie Banner, Borlabs Cookie, Complianz, Cookiebot, OneTrust and Usercentrics all support it.
  2. File us as functional, not marketing. Put the service in the functional category (also called essential, necessary or technically required). Only then does the script run for visitors who do not accept. Do not wrap the script in your tool's blocking syntax (a content blocker rule, cmplazyload, a script blocker): that has the same effect as marketing.

Tip: Functional, not marketing

The script sets no cookies, stores nothing in the browser, uses no identifiers and does not keep IP addresses, so it does not need consent to run. Filing us under marketing is not safer, it only switches the FIU functionality off for everyone who declines. The installation page has the paragraph for your privacy policy and the legal details.

How to check: Open one of your pages in a private window and do not click the cookie banner. Right-click the page, choose Inspect, and search (Ctrl+F, or Cmd+F on a Mac) for foodinfluencersunited. If you find a <script> with src="https://cdn.foodinfluencersunited.com/tagLogic.js", the script runs for everyone. If the only match is a script with type="text/plain", type="application/consent" or data-cmp-src, it is still blocked. No match at all means the script is not installed on that page.

Rather not dig into the code? Send us your site's URL at [email protected] and we'll confirm it's live and help you finish up.

My website has a Content-Security-Policy. What do I add so the script works?

What's happening: A Content-Security-Policy is a list of hosts your pages may load scripts, data, frames and images from. Your site sends it, as a response header or a <meta http-equiv="Content-Security-Policy"> tag, and your developer, your host or a security plugin sets it up. The browser blocks every host that is not on that list, ours included. Most sites send no such policy and have nothing to do here. If yours does, our hosts have to be added to it, and what a missing host breaks depends on the line it is missing from:

  • The script host: nothing from us loads.
  • The API host: the script loads but cannot ask our servers which buttons and brand recommendations belong on the page, so none appear and your page views are not counted.
  • The widget host: the buttons appear, but the widget opens as a full page instead of on top of your page (see that FAQ).
  • The image host: the buttons and brand recommendations appear without their images.

What to do: add our hosts to these lines of your policy, next to the hosts already on them:

  • script-src: https://cdn.foodinfluencersunited.com, the script itself.
  • connect-src: https://api.foodinfluencersunited.com, where the script asks which buttons and brand recommendations belong on the page.
  • frame-src: https://tobasket.com and https://*.tobasket.com, the widget that opens when a visitor clicks a supermarket button. The wildcard alone does not cover tobasket.com itself.
  • img-src: https://cdn.foodinfluencersunited.com and data:, the supermarket logos and brand images.

https://*.foodinfluencersunited.com covers both our script host and our API host, so you can add that one to script-src, connect-src and img-src instead. When your policy has no line for one of these, the browser uses your default-src line for it (for frames, child-src first), so add the hosts there. The script also adds the styling of its buttons in a <style> element, so the line that covers styles (style-src, or default-src when there is none) needs 'unsafe-inline'; most policies already have it.

Tip: Your policy, your configuration

A Content-Security-Policy is your site's own rule, and your visitors' browsers enforce it. No script can loosen the policy of the page it runs on, ours included, so nothing on our side can get past it: only a change to the policy itself lets us in. That change is made where your policy is set, by your developer, your host or in the settings of your security plugin.

How to check: Open one of your recipe or product pages, open the browser console (right-click the page, choose Inspect, then the Console tab) and reload the page. Every host your policy blocks shows up as an error that names the host and the line that blocks it; in Chrome it starts with Refused to. No such error for foodinfluencersunited.com or tobasket.com means your policy lets us through.

Not sure what to change? Send us your site's URL at [email protected] and we'll tell you exactly which lines need our hosts.

Clicking a supermarket button opens the widget as a full page instead of on top of my page. How do I fix that?

What's happening: The widget normally opens on top of your page, in a frame from tobasket.com. When your page does not let that frame load, the script opens the same widget as a full page on tobasket.com instead, in the same tab. Your visitors can still shop and order there, and the back button brings them back to your recipe.

What to do: one of two things stops the frame. Open your browser console on the recipe page and look for the message that starts with [FIU]: it names the cause.

  1. Your site's security policy. Some sites send a Content-Security-Policy: a list of hosts the page may load content from, managed by your developer, your host or a security plugin. If that list has a frame-src line (or child-src or default-src when frame-src is missing), the browser only shows frames from the hosts on it, including the frame our script adds. Add https://tobasket.com and https://*.tobasket.com to that line; the wildcard alone does not cover tobasket.com itself. The Content-Security-Policy FAQ lists every host the script needs.
  2. Your consent tool. Some consent tools, consentmanager among them, hold back a frame from a host they do not know, even after the visitor accepts everything. Add tobasket.com to the Food Influencers United service, next to cdn.foodinfluencersunited.com, so the frame follows the same setting as the script. The consent tool FAQ explains that setting.

Not sure which applies? Send us your site's URL at [email protected] and we'll check it for you.

My website uses WP Rocket and the buttons only appear after a visitor scrolls or taps. How do I fix that?

What's happening: WP Rocket's Delay JavaScript execution holds scripts back until the visitor scrolls, taps, clicks or moves the mouse, and ours is one of them unless WP Rocket is told to leave it alone. Visitors who interact see the buttons a moment later. Visitors who only read the recipe never see them, and their page views are not counted.

What to do: WP Rocket has a ready-made exclusion for our script, you only need to switch it on.

  1. In your WordPress dashboard, open Settings, then WP Rocket, and go to the JavaScript & CSS tab (File Optimization in older versions).
  2. Under Delay JavaScript execution, open One-click exclusions, then 3rd parties and Analytics & Trackers, and tick Food Influencers United - Recipe Widget.
  3. Click Save Changes. Then clear WP Rocket's cache, and the cache at your host or CDN if you have one, so your visitors get the updated pages.

Not in the list yet? WP Rocket updates that list once a week. To get it right away, go to the Tools tab and click Update lists under Update Inclusion and Exclusion Lists. This needs an active WP Rocket license.

Tip: No license, or an older WP Rocket?

Add the line cdn.foodinfluencersunited to the Excluded JavaScript Files field under Delay JavaScript execution. When Minify JavaScript files is on, add it to the Excluded JavaScript Files field under that option as well: with only one of the two, WP Rocket still holds the script back.

How to check: Open one of your recipe pages in a private window, so you see what your visitors get, and view its source: press Ctrl+U, or Cmd+Option+U on a Mac. Search it (Ctrl+F, or Cmd+F on a Mac) for cdn.foodinfluencersunited. If the script that loads from there has src=, it runs straight away. If it has data-rocket-src=, or the search finds nothing because WP Rocket serves its own copy from /wp-content/cache/, the script is still held back: check the steps above and clear the caches again.

Rather not change it yourself? Send us your site's URL at [email protected] and we'll check it for you.

How is the placement of the buttons determined?

There are two options. Option 1: you control the placement yourself by adding <div class="fiu-button-container"></div> to the desired location on your page. Option 2: let us handle it. We can configure the button placement on our side so you don't have to change your page templates.

What should I do when my URL structure changes?

FIU uses the URL of your pages as a unique identifier for your recipes. So when your URLs change, for example after a website redesign or migration, FIU will automatically re-discover and re-index all of your recipes. This is completely normal and nothing to worry about, but it may take a while for our servers to complete. Want the transition to happen right away? Just send us an email at [email protected] with the old and new URL format (e.g. /old-path/recipe-name to /new-path/recipe-name), and our team will take care of the rest so the switch happens instantly.

What should I do when my page layout or HTML changes?

That depends on how your buttons are set up. If you have placed the <div class="fiu-button-container"></div> element on your pages yourself, just make sure it stays in place after the changes. That's all! If the button placement is managed by FIU, please drop us an email at [email protected] and we'll update the configuration to match your new page layout.

I'm migrating to a new website, what should I check?

Migrating to a fresh stack? Run through this checklist before you flip the switch:
  • We assume your domain stays the same. If it's changing, email [email protected] first so we can coordinate.
  • schema.org markup is mandatory on your recipe and product pages. Without it, FIU can't identify your content on the new site.
  • Reinstall the CDN script on the new website. See the Installation page for the snippet.
  • Keep your URL paths identical where possible. This minimises downtime and avoids a re-indexing window. See the URL-structure FAQ if paths do need to change.
  • Button placement still works the two ways described in the placement FAQ. Pick the one that fits your new templates.
  • Let us know your toggle window by emailing [email protected] so we can be on standby during the switch.