Custom code needs a paid Site plan (or a Workspace plan that allows it).
-
In the Webflow Designer open Site settings > Custom code.
-
In Head code, paste:
<script defer data-website-id="dgid_XXXXXXXXXXXXXXXX" data-domain="example.com" src="https://a.example.com/js/script.js" ></script>
srcis your collector (where it lives). With DNS on Cloudflare, a custom subdomain such asa.example.comkeeps the script first-party. -
Save changes, then Publish to your custom domain (custom code does not run in the Designer preview).
Give any button or link the custom attribute data-fast-goal = signup (Element settings >
Custom attributes). Extra attributes data-fast-goal-plan = pro become goal parameters.
Webflow Ecommerce charges through your Stripe account: connect it in DataGoat (Integrations > Stripe) and the orders arrive as payments. To attribute them to the visit, report the buyer's email on the order confirmation page. Add an Embed element to that template; the selector below finds the email in Webflow's default confirmation layout, adjust it if your template differs:
<script>
window.datagoat = window.datagoat || function () { (window.datagoat.q = window.datagoat.q || []).push(arguments); };
var email = document.querySelector(".w-commerce-commerceorderconfirmationcontainer [href^='mailto:']");
if (email) window.datagoat("payment", { email: (email.textContent || "").trim() });
</script>DataGoat matches the email with the Stripe payment and attributes it to the visitor.
Open the published site and check the dashboard's Realtime view.