Install on Webflow
View as MarkdownAdd Reveata to a Webflow site, serve it from your own subdomain, and count clicks on Webflow buttons and links as goals.
On this page
Webflow adds code to the <head> of every page from the site settings. Site-wide custom code needs a paid Site plan or a paid Workspace plan; the free Starter plan can't add it.
Copy the snippet from your Reveata dashboard (it contains your website’s tracking id):
<script
defer
data-website-id="ws_your_tracking_id"
src="https://reveata.com/js/script.js"
></script>Add it to your site
- Open your site’s Site settings and choose the Custom code tab.
- Paste the snippet into Head code. The field takes up to 50,000 characters, so it fits next to other code you already have.
- Select Save changes.
- Publish the whole site. Custom code only runs on the published site, and publishing a single page doesn’t publish site-level code.
In Reveata, add the website with your custom domain. Your .webflow.io staging address is another host: visits there are refused unless you add it under Settings → General → Additional domains. Leaving it out keeps your own testing out of your numbers.
Webflow pages are full page loads, so every page is counted with no extra setup.
Serve it from your own subdomain
Webflow can’t run proxy code, but the managed proxy needs none: you add one DNS record (for example stats.example.com) where your domain’s DNS is managed, and Reveata gives you a new snippet to paste into Head code instead. Fewer visits are lost to ad blockers. It works with a custom domain, not with the .webflow.io address.
Revenue
Webflow Ecommerce. Webflow takes payments through the Stripe (or PayPal) account you connected in Settings → Ecommerce → Payments. Connect the same Stripe account in Reveata under Settings → Payments with a restricted key or Connect with Stripe. Orders then count as revenue. Webflow creates its own Stripe payments, so they carry no visitor id: they are credited to a visit by the buyer’s email, for visitors you identified (see below). PayPal payments are not in Stripe and are not imported.
Stripe Payment Links and Buy Buttons. Many Webflow sites link to a hosted checkout. Those links are credited to their visit with no code: the script adds the visitor id when someone clicks. See Stripe Payment Links and buy buttons.
Identify buyers by email. Add this to Footer code to identify people when they submit a Webflow form with an email field:
<script>
document.addEventListener('submit', function (e) {
var input = e.target.querySelector('input[type="email"]');
var email = input && input.value.trim().toLowerCase();
if (email && window.reveata) window.reveata('identify', { userId: email, email: email });
});
</script>A later Stripe payment with the same email is then credited to that visitor’s visits. Only identify people when your privacy policy covers it: see Identify visitors.
Check it works
- Open your published site in a normal browser window with ad blockers turned off for it.
- Open Realtime in Reveata: your visit appears within a few seconds.
- If it doesn’t, view the page source of the published site and search for
data-website-id, then follow Verify your installation.
Goals
To count clicks as goals, select the button or link in the Designer, open the Element settings panel, and under Custom attributes add the name data-reveata-goal with a value such as signup. Publish again. See Custom goals.
Common pitfalls
- Not published. Saving custom code is not enough: publish the whole site.
- Testing in the Designer or preview. Preview doesn’t run custom code by default, and the Designer never does. Test the published site.
- Testing on
.webflow.io. It is refused unless it is one of the website’s additional domains, and the install check says so. - A cookie consent tool. If your consent tool holds back scripts until people accept, visits only count after they do. Cookieless mode (
data-cookieless="true") needs no cookies at all. - Two copies. If the snippet is both in Head code and in a page’s own custom code, the second copy is ignored, but remove it to keep things clear.