Mac finder widget: installation guide
Add the widget in a couple of minutes. You need a free account and a website where you can paste HTML.
1. Create your widget
Create an account (or sign in), then open Your widgets. Give the widget a name, list the websites that may show it and choose a theme. You will get an install snippet with your public key.
2. Install it
Paste the snippet where you want the finder to appear. It looks like this:
<div data-bmfy-widget="pk_live_YOUR_PUBLIC_KEY"></div>
<script src="https://www.bestmacforyou.co.uk/js/widget/v1/embed.js" integrity="sha384-LXJkHGJm50Y/K34vQKs12JsdoMit26VH/GqTXvr2OPPOQgTUQ36kdApeAJlDAM1E" crossorigin="anonymous" async></script>
The script is loaded once per page, even if you add several widgets. It creates a sandboxed frame inside each data-bmfy-widget element, and keeps the frame the right height.
WordPress
- Edit the page or post and add a Custom HTML block where you want the finder.
- Paste the snippet and click Preview to check it.
- Publish or update the page.
If your theme or security plugin removes the integrity attribute or blocks scripts, see the content security policy section below.
Options
Add these attributes to the div:
| Attribute | Values | What it does |
|---|---|---|
data-bmfy-widget | Your public key | Required. Starts with pk_live_. |
data-theme | light, dark, auto | Overrides the theme chosen in your account. |
data-height | 300 to 3000 (pixels) | Starting height before the finder measures itself. Default 640. |
<div data-bmfy-widget="pk_live_YOUR_PUBLIC_KEY" data-theme="dark" data-height="700"></div>
Allowed domains
Your widget only works on the websites you list. Enter one hostname per line, for example example.com. Use *.example.com to allow every subdomain, such as blog.example.com; this does not include example.com itself, so list it too if you need it. Do not include https://, paths, port numbers or IP addresses. You can list up to five domains.
The restriction is enforced by the visitor's browser: our page tells it which sites may display the widget, and anywhere else the browser refuses. The public key is not a secret, but it cannot be used on other websites. If someone does copy your key, change it from your widget's page; the old key stops working immediately.
Subresource integrity (SRI)
The snippet includes an integrity attribute so the browser only runs the exact script we published. When we release a new version of the loader, it is published at a new versioned address, so your existing snippet keeps working.
sha384-LXJkHGJm50Y/K34vQKs12JsdoMit26VH/GqTXvr2OPPOQgTUQ36kdApeAJlDAM1E
Always copy the snippet from your account, which has the current hash for https://www.bestmacforyou.co.uk/js/widget/v1/embed.js.
Content security policy for your site
If your website sends a Content Security Policy, allow our script and frame:
script-src https://www.bestmacforyou.co.uk;
frame-src https://www.bestmacforyou.co.uk;
The widget makes no requests from your page other than loading the script and the frame.
Limits and fair use
- Up to 5 widgets per account and 5 domains per widget.
- Up to 30 requests a minute for each visitor, and a daily limit of recommendations for each widget (20,000 by default).
- When a limit is reached, the visitor sees “This Mac finder is busy, please try again later.”
- We may suspend widgets that are used on websites that break our terms, or that generate abusive traffic. You will be emailed with the reason.
Security and privacy
- The widget runs in a sandboxed frame on our domain, so it cannot read your page, and your page cannot read it.
- It sets no cookies and uses no local storage on your visitors' devices.
- We count anonymous totals only: views (once per visitor every 30 minutes), quizzes started and finished, and clicks to Amazon. We do not store visitor IP addresses against your widget, and we do not track visitors across sites.
- The frame and the loader only exchange the frame's height, and only with your allowed domains.
- Read our privacy policy for details.
Affiliate disclosure
Purchase links inside the widget go to Amazon UK and use the BestMacForYou Amazon Associates tag. If a visitor buys after clicking one, BestMacForYou earns a commission at no extra cost to them. The widget says so near the links. Because of this, the widget must not be altered to hide its links or the “Powered by BestMacForYou” credit. See the affiliate disclosure.
Frequently asked questions
Is the widget really free?
Yes. There is no charge. In return, the widget shows a “Powered by BestMacForYou” link and its Amazon links carry our affiliate tag, so we earn a commission on qualifying purchases.
Can I earn commission from the widget?
No. Purchase links in the widget use the BestMacForYou Amazon Associates tag, not yours. This is how we pay for the free service.
Why does the widget show “unavailable”?
Either the widget has been deleted or suspended, or it is being shown on a website that is not in its allowed domains list. Check the domains in your account.
It works on my site but not in the preview of my page builder.
Some builders show previews from a temporary address that is not in your allowed domains. Add that address while you work, then remove it.
What happens if my site gets a lot of visitors?
Each widget has a daily fair-use limit of recommendations and a per-minute limit for each visitor. When either is reached, the widget asks the visitor to try again later. Contact us if you need more.
Can I change the colours?
You can choose a light, dark or automatic theme. The layout and typography are fixed so the finder always looks consistent and accessible.