Analytics setup with the real GetFluxly JavaScript SDK.
Install @getfluxly/sdk-js from npm or load it from jsDelivr. The SDK auto-captures pageviews, clicks, forms, and page leave, then lets you identify users and send custom product events.
Event flow
Browser and server events should meet in one timeline.
The browser SDK captures product behavior. The Events API captures trusted backend events like invoices, subscriptions, and webhook activity. Together they explain what the user did and what your system did for that user.
Why this matters
- The browser SDK auto-captures product behavior as soon as it loads.
- identify() connects anonymous activity to the user ID your app already uses.
- Server events and browser events can land on the same customer timeline.
Setup
Start with script tag, npm, or plain HTTP.
Set `window.__GFLUX__` with your API key and API host before the SDK loads. For backend events, post JSON to `https://api.getfluxly.com/v1/events`.
- Use the script tag for regular websites, Django, Rails, PHP, and static HTML.
- Use npm install @getfluxly/sdk-js for React, Next.js, Vue, Svelte, and bundled apps.
- Use Authorization: Bearer gf_live_REPLACE_ME when you post server events.
<script>
window.__GFLUX__ = {
apiKey: "GFLUX_API_KEY",
apiHost: "https://api.getfluxly.com"
};
</script>
<script src="https://cdn.jsdelivr.net/npm/@getfluxly/sdk-js@latest/dist/gflux.iife.js"></script>Server event rule
Do not make analytics slow down the product. In user-facing backend routes, save your app state first, respond to the user, then send GetFluxly from a queue or a fire-and-forget call with error handling.
Browser API
Use auto-capture first, then add explicit calls.
The SDK tracks common behavior by default. Use these browser methods when your app knows something important, like who the user is or which business event just happened.
identify(externalId, traits)
Call after login or signup to link anonymous activity to a known user.
track(eventName, properties)
Send custom product or revenue events that auto-capture does not know about.
reset()
Clear identity on logout so the next user does not inherit the previous profile.
destroy()
Flush queued events and remove listeners when you intentionally tear the SDK down.
Analytics features
One place for product and lifecycle insight.
These SDK behaviors come from the released browser package. They are enough to start an MVP analytics flow, then you can add custom events where the product needs more detail.
Auto-capture
Pageviews, clicks, forms, and page leave.
- Tracks $pageview on load and SPA navigation.
- Tracks clicks on links, buttons, role buttons, and data-flx elements.
- Tracks form submissions and page leave timing.
Event queue
Batches events before sending.
- Flushes every few seconds by default.
- Flushes when the queue reaches the configured size.
- Uses sendBeacon on page leave to reduce data loss.
Configuration
Control capture and retry behavior.
- apiKey and apiHost are required.
- autocapture can disable pageviews, clicks, forms, or pageLeave.
- flushIntervalMs, flushQueueSize, and maxRetries can be tuned.
Use cases
Examples of GetFluxly analytics in real product work.
These examples match the public SDK and HTTP API patterns. For full snippets across React, Next.js, Vue, Svelte, Node, Express, Python, Go, PHP, and cURL, use the examples page.
Onboarding activation
Track setup progress and send helpful nudges when users stall.
Revenue cohort analysis
Mix payment events with product activity to see which cohorts grow.
Churn prevention
Watch usage drops and failed invoices, then react before users leave.
Compare
How GetFluxly compares to PostHog and Customer.io.
GetFluxly is not a generic ESP or a generic analytics platform. It is a focused tool for teams that want product insight and lifecycle messaging to work from the same customer record.
Versus PostHog
GetFluxly keeps event analytics and lifecycle email on the same profile data.
Versus Customer.io
GetFluxly adds product analytics and funnels to the messaging data model.
Versus a stitched stack
GetFluxly gives engineering one integration instead of several tools to keep aligned.
Private beta
Join the waitlist.
Join if you want product analytics, profile stitching, and lifecycle email without giving away your sending stack or juggling separate tools.
Prefer a direct conversation? Email hello@getfluxly.com