Install
Add analytics and revenue attribution to Webflow
Webflow has a dedicated field for exactly this, and the install is a copy-paste into Site Settings. The part worth reading is what to do after: turning form submissions into goals so the dashboard shows conversions and not just traffic.
Paste the snippet into Site Settings
Open Site Settings → Custom Code → Head Code, paste the tag, save, then publish. Custom code only takes effect on published sites, not in the Designer preview — if you don't see events, check that you published.
Site Settings → Custom Code → Head Code<script defer src="https://revtrail.pyln.dev/track.js" data-site="SITE_KEY"></script>Track form submissions as conversions
Webflow forms fire a native submit event and then show the success state. Add a listener in Footer Code that fires a Revtrail event on submit, so newsletter signups and contact requests become goals you can attribute to a channel.
Site Settings → Custom Code → Footer Code<script> document.addEventListener("submit", function (e) { if (e.target && e.target.tagName === "FORM") { window.revtrail && window.revtrail("form_submit"); } }); </script>Confirm it's receiving
Open your site in a normal browser tab, then check Realtime in the Revtrail dashboard — your own visit should appear within a few seconds. If nothing arrives, the usual causes are a mistyped site key, an ad blocker on your own browser, or a Content-Security-Policy that blocks the script origin.
Ecommerce orders, if you sell through Webflow
Webflow Ecommerce checkouts complete on an order-confirmation page. Fire a named event from that page's custom code so orders show up as a goal. For verified revenue amounts you still need the payment webhook — Webflow Ecommerce settles through Stripe, so point that Stripe webhook at Revtrail and the amounts arrive verified rather than typed into a script.
Why not just use Webflow's built-in analytics?
Webflow's Site Analytics gives you traffic and basic engagement, and it's fine for that. What it doesn't do is connect a visitor's first touch to a payment weeks later, or rank referrers by the revenue they produced. If you're running campaigns into a Webflow site, that gap is the reason to add a second tool.
Custom code is per-site, not per-page
Head Code in Site Settings applies to every page. There's also per-page custom code in each page's settings — use that only for events specific to one page, like an order confirmation. Putting the tracking snippet in per-page code is how sites end up half-instrumented.
Webflow plan requirements
Custom code in Site Settings requires a paid site plan. On the free .webflow.io staging domain, custom code is stripped, so you can't test the install there — publish to a custom domain first.
Questions people actually ask
- Do I need to know how to code?
- For the tracking snippet, no — it's one paste into a settings field. The form-tracking step is a copy-paste too; you don't need to modify it unless you want different event names per form.
- Why aren't events showing up in the Designer?
- Custom code doesn't run in Designer preview. Publish the site and test on the published URL.
- Do I need a cookie banner for this?
- Not for Revtrail. The default identity is a daily rotating hash — no cookies, no persistent identifier, nothing stored on the device. If you run ad pixels or other analytics that do use cookies, their obligations are unchanged.
- Will this slow my site down?
- The script is deferred, so it never blocks rendering, and it's about 3KB over the wire gzipped. It fires one beacon per pageview.
Install guides