Sites & snippet
Install the snippet
After you add a site, adfit gives you a small snippet to install. You add it once to the <head> of your site and adfit takes care of the rest. It loads asynchronously and won't slow your pages.
Where to find your snippet
Right after you add a site, adfit opens its Setup page with the snippet. To find it later, open the site and choose Setup in the sidebar. Use the copy button to grab the exact embed code; it's generated for your site, so copy it rather than typing it out.
Always paste it into the <head>
Wherever your platform lets you add code, the snippet goes into the <head> of your pages, not the body or the footer. Placing it in the <head> lets adfit personalize content before it's shown.
Choose your platform
Jump straight to the steps for how your site is built:
Static HTML
Paste the snippet into the <head> of every page you want adfit to personalize.
Step 1
Open your site's HTML template (the file that renders the <head>).
Step 2
Paste the snippet just before the closing </head> tag.
Step 3
Save and re-deploy your site.
WordPress
Add the snippet to the site <head> via your theme or a header-scripts plugin.
Step 1
In your WordPress admin, open Appearance → Theme File Editor (or a plugin like "WPCode" / "Insert Headers and Footers").
Step 2
Paste the snippet into the <head> section (header) area.
Step 3
Save your changes.
Good to know
If you use WP Rocket, add the adfit script to "Excluded JavaScript Files" so it isn't delayed or combined; the exclusion pattern /s/ covers the snippet and everything it loads. The snippet already carries data-no-defer and data-no-optimize attributes, but some optimizers need an explicit exclusion.
Framer
Add the snippet as a custom script that loads at the start of your site's <head>.
Step 1
In your Framer project, open Settings → Code, then click "Add Script".
Step 2
In the dialog, give the script a Name you'll recognize, e.g. "adfit".
Step 3
Set Placement to "Start of <head>". This is critical: the default "End of <body>" runs the snippet only after the page has painted, which causes a visible flash of the original content.
Step 4
Leave Page set to "All" so every page loads the snippet.
Step 5
Set Run to "Once". adfit handles in-app navigation automatically, so the snippet only needs to run once.
Step 6
Paste the snippet into the Code field, then click "Add".
Step 7
Publish your site. Custom code only runs on the published site, not in the Framer canvas.
Webflow
Add the snippet to the site-wide custom code in your <head>.
Step 1
In Webflow, open Project Settings → Custom Code.
Step 2
Paste the snippet into the "Head Code" field.
Step 3
Save changes and publish your site.
Shopify
Add the snippet to your theme's layout <head>.
Step 1
In your Shopify admin, go to Online Store → Themes → … → Edit code.
Step 2
Open Layout → theme.liquid and paste the snippet just before the closing </head> tag.
Step 3
Save the file.
Good to know
The snippet runs on standard storefront pages loaded through your theme's <head>. Checkout pages and app embeds are not supported, so those pages are not personalized.
After you install
After installing, open your site once in a new tab. adfit verifies the connection automatically.
The Setup page shows the connection status at the top. While the site is not connected yet, it also offers Open your site to verify and Run a connection check with a Check now button, so you can install and confirm without leaving the page. Once the site has connected for the first time, setup is complete. The page stays, and from then on it shows your embed code and the snippet settings under the status.
If the status doesn't turn to Connected on its own, you can run a check yourself. See Verify your connection. If it still won't connect, Troubleshooting covers the usual causes.