Installing a tracking script on Webflow, WordPress, Shopify and Framer
Short answer
Paste the tracking script into the site-wide head code area of your builder, publish, then verify. In Webflow and Framer that is the custom code section of site settings; in WordPress use a header plugin or child theme; in Shopify use theme.liquid plus the separate customer events area for checkout. Confirm a real test conversion arrives before trusting it.
Pasting a script into a website builder takes two minutes. Finding out three weeks later that it never ran on the pricing page, or ran twice on every page, takes much longer and costs real data. This guide covers where the code goes in each popular builder, the specific way each one tends to fail without warning, and a short verification routine that catches those failures on day one.
Before you paste anything
Get three things straight first, because they decide where the code goes.
- Which pages need it. Most tracking scripts belong on every page, so they go in site-wide head code. A conversion event snippet might belong only on a thank-you page.
- Which domains you have. A marketing site on Webflow, a blog on WordPress and an app on its own subdomain are three installs, not one. If visitors move between them, read cross-domain tracking for checkout and booking pages before you start.
- Whether a consent tool controls scripts. If a consent manager blocks tags until the visitor agrees, your script may need to be registered in that tool instead of pasted directly.
Take an Austin B2B logistics platform as the running example. Its marketing site runs on Webflow, its resource library on a WordPress subdomain, its partner shop for branded shipping supplies on Shopify, and a campaign microsite for a trade show on Framer. Four builders, one company, and every one of them needs the script.
Webflow
Site-wide code goes in the project's site settings, in the custom code tab, in the head code box. Individual pages also have their own custom code area in page settings for page-specific snippets.
Where it goes wrong:
- Not publishing. Saving custom code does nothing until you publish to the live domain.
- Plan limits. Custom code has generally required a paid site plan. If the field is unavailable or the code does not appear on the live site, check the plan.
- Staging vs live. Webflow publishes to a
webflow.iostaging address and your custom domain. Testing on staging pollutes your data with internal visits, and some scripts are restricted to approved domains, so they appear broken on staging while working on the real site.
WordPress
There is no single correct place, which is the problem. The safest options are a header-and-footer code plugin or a child theme's header template. Many tag managers and analytics vendors also offer official plugins.
Where it goes wrong:
- Theme updates. Code pasted directly into a parent theme's files disappears when the theme updates. Use a plugin or a child theme.
- Optimization plugins. Caching and performance plugins often defer, delay or combine JavaScript until the user interacts with the page. That can mean a visitor who reads and leaves without scrolling never triggers your script at all. Exclude the tracking script from delay and combine settings.
- Cached pages. After adding the script, clear every cache layer (plugin, host and CDN), or visitors keep receiving old HTML without it.
Picture the logistics company's resource library running a page-speed plugin that holds all scripts until the first scroll. Ad visitors who read the top of an article and leave would never be recorded, and paid traffic to the library would look far smaller than it is.
Shopify
Storefront pages are controlled by the theme. In the theme code editor, the main layout file (usually theme.liquid) holds the head section where site-wide scripts go. Some vendors provide an app instead, which installs code through an app embed that you switch on in the theme customizer.
Where it goes wrong:
- Checkout is separate. Theme code does not run on Shopify's checkout and order status pages. Shopify handles tracking there through its customer events area, where you add custom pixels that run in a sandbox and subscribe to standard events such as checkout completed. Shopify has been changing how checkout customization works, so check its current documentation for which method applies to your store.
- Theme switches. A new or duplicated theme does not always carry your edits. Re-check the head code after any theme change.
- Double installs. A pixel added through a sales channel app and the same pixel pasted into the theme will fire twice.
Framer
Site-wide code lives in the site settings, under a custom code section that, at the time of writing, offers slots at the start and end of the head and body. Pages can carry their own code too.
Where it goes wrong:
- Publishing again. Like Webflow, the change is only live after you publish.
- Client-side navigation. Framer sites can move between pages without a full reload. A script that only records a page view on load may record the first page and miss the rest. Check whether your tracking vendor handles route changes, as covered in tracking in single-page apps and funnel builders.
- Forms. Framer's native forms submit without a page change, so a thank-you page goal will not fire unless you set a redirect or listen for the submission.
Verify that events actually arrive
A script loading is not the same as data arriving. Run this on each site, on the live domain, in a private window:
- Visit with test UTMs, for example
?utm_source=test&utm_medium=qa&utm_campaign=install-check. - Open the browser's developer tools, go to the Network tab, and filter by the vendor's domain. You should see the script load once and a request go out. Two identical requests per page view means a double install.
- Navigate to a second and third page, including at least one deep template like a blog post or product page. Confirm requests appear for each.
- Submit a real test conversion: fill the demo form, start a checkout, or book a call, using a clearly fake test name.
- Find that conversion in the destination, whether that is the ad platform's test events tool, your analytics real-time view or your reporting workspace. Check the page URL and UTMs came through correctly.
- Repeat on a phone, on mobile data, since some layouts load different templates.
- Delete or label the test data so it does not count as a real lead.
The step people skip is the fifth. With a lead-focused script such as the Adtrix tracking script, which records leads and booked calls, the meaningful check is a test demo request showing up as a recorded lead with its UTMs attached, not the script appearing in the page source.
For forms on these builders, especially third-party embeds, tracking form submissions from Typeform, Jotform and native forms covers getting UTMs into each submission. And before a campaign goes live, a fuller test plan is in QA your tracking before launching a campaign.
FAQ
Should the tracking script go in the head or the body?
Most vendors ask for the head so the script loads early and catches visitors who leave quickly. Follow the vendor's instructions, and only move it if they explicitly support a body placement.
Why does my script show in the page source but record nothing?
Common causes are a consent tool blocking it, an optimization plugin delaying it until interaction, a domain restriction in the vendor's settings, or a browser extension blocking it during your test. Check the Network tab in a clean private window to see whether requests leave the browser.
Do I need to install the script on Shopify checkout separately?
Yes, in most setups. Theme code does not run on checkout pages, so conversion tracking there uses Shopify's customer events and custom pixels or an app integration. Confirm the current method in Shopify's documentation.
How do I tell if a script is installed twice?
Look in the Network tab for two identical requests per page view, or check whether the platform reports exactly double the expected events. Then search the theme code, plugins, apps and tag manager for every copy.
See your own numbers with the source attached
Adtrix connects Meta and Google Ads read-only, shows each ad next to its spend and reported results, and keeps CRM leads and booked calls in their own lane.