Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.18 KB

bubble.md

File metadata and controls

43 lines (30 loc) · 1.18 KB

DataGoat on Bubble

Custom header scripts need a paid Bubble plan.

  1. In the editor open Settings > SEO / metatags.

  2. 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>

    src is your collector (where it lives).

  3. Deploy to Live. The header code runs on every page of the live app.

Goals and identify from workflows

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).

Revenue

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.

Verify

Open the live app and check Realtime.