Custom header scripts need a paid Bubble plan.
-
In the editor open Settings > SEO / metatags.
-
In Script/meta tags in header, 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). -
Deploy to Live. The header code runs on every page of the live app.
Install a plugin that runs JavaScript (for example "Toolbox" with its Run javascript action) and add actions to your workflows:
window.datagoat && window.datagoat("signup");window.datagoat && window.datagoat("identify", { user_id: "Current User's unique id", name: "Current User's name" });(insert the dynamic values with Bubble's expression editor).
If you charge with Stripe, connect the Stripe account in DataGoat. On your payment success page,
run window.datagoat("payment", { email: "Current User's email" }) so DataGoat can attribute the
payment to the visit.
Open the live app and check Realtime.