Tracking Signups & Logins
Measure account creation and returning-user activity with one line of code — or a single HTML attribute.
The use-case
The Acquisition Funnel on your dashboard tracks visitors from Visited → Engaged → Signed up → Converted. The first two stages are derived automatically from behaviour, but “Signed up” only fills in once you tell FlowGrid when a user creates an account. That's what signup tracking does — it attaches a signup event to the visitor so the funnel, conversion rate, and channel attribution all become complete.
Logins are tracked separately as a returning-user signal (not a conversion), and surface as the Loginstile in the “Who's visiting” panel.
Option 1 — the SDK function (recommended)
Call fg.signup() from your code once your authentication flow confirms a new account. Pass the userId and the method used (email, google, github, apple, sso…). An optional third argument records the traffic source for attribution.
1// After your auth flow resolves the user, record the signup.
2// Populates the Acquisition Funnel "Signed up" stage.
3fg.signup("user_123", "google"); // userId, method
4fg.signup("user_123", "email", "pricing"); // + traffic source
5
6// Record a returning-user login (a retention signal, not a conversion).
7fg.login("user_123", "google");Option 2 — the HTML attribute (no-code)
For site builders where you can't run custom JavaScript, add a data-fg-signupattribute to the signup button. FlowGrid fires the event on click and attaches the visitor automatically — no userId required (the funnel keys on the visitor). The attribute's value is the signup method.
1<!-- No-code: works on Wordpress, Webflow, Shopify, Framer, plain HTML -->
2<!-- The attribute value is the signup method. -->
3<button data-fg-signup="google">Sign up with Google</button>
4
5<!-- Optional: attach the user id once you know it -->
6<button data-fg-signup="email" data-fg-userid="user_123">Create account</button>
7
8<!-- Logins -->
9<button data-fg-login="google">Log in</button>Option 3 — the generic track() API
If you already use fg.track() for your events, the same result is achieved with the signup_completed and login_completed event names.
1// Equivalent to fg.signup() / fg.login(), via the generic track() API.
2fg.track("signup_completed", { userId: "user_123", method: "google", source: "pricing" });
3fg.track("login_completed", { userId: "user_123", method: "google" });Where it shows up
Signups appear in the Acquisition Funnel“Signed up” stage and feed your conversion rate. Logins appear in the Loginstile under “Who's visiting”. Both update within a few minutes of the first event.
Before you start
Make sure the tracking script is installed on your site. Signup tracking is disabled on localhost.