Visitor intelligence, link tracking, source attribution, and behavioral analytics for Phoenix.
GoodAnalytics is a pluggable Elixir/Phoenix library that adds visitor intelligence, link tracking, source attribution, and behavioral analytics to any existing Phoenix application.
Configuration
config :good_analytics,
repo: MyApp.Repo,
links: [domains: ["mybrand.link"]]
Summary
Functions
Archive a link.
Archive a partner, scoped to a workspace.
Create a tracked short link.
Create a referral partner.
Returns the sentinel workspace UUID for single-tenant library mode.
Remove all PII, events, and identity signals for a visitor (GDPR).
Get an active partner by key and workspace.
Get a link by ID.
Get a link by domain and key.
Get a partner by ID, scoped to a workspace.
Get a visitor by ID.
Get a visitor by host-app external ID.
Associate a visitor with the host app's known person attributes.
Get the most recent event of a given type for a visitor.
Get click events for a link.
Get aggregated stats for a link.
List recent events for a workspace.
List links for a workspace.
List partners for a workspace.
List recent visitors for a workspace.
Register a callback for an event type.
Resolve tracking signals to a single visitor record.
Returns the PostgreSQL schema name used by GoodAnalytics tables.
Generate social share URLs for a short link.
Get source platform/medium breakdown for a workspace.
Record a tracking event.
Track a lead (signup).
Track a sale.
Update a link.
Update a partner, scoped to a workspace.
Update visitor attribution (extension point for GoodPartners).
Update visitor lifecycle status.
Get the attribution path for a visitor.
Get the full event timeline for a visitor.
Functions
Archive a link.
Archive a partner, scoped to a workspace.
Create a tracked short link.
Create a referral partner.
@spec default_workspace_id() :: String.t()
Returns the sentinel workspace UUID for single-tenant library mode.
Remove all PII, events, and identity signals for a visitor (GDPR).
Get an active partner by key and workspace.
Get a link by ID.
Get a link by domain and key.
Get a partner by ID, scoped to a workspace.
Get a visitor by ID.
Get a visitor by host-app external ID.
Associate a visitor with the host app's known person attributes.
Get the most recent event of a given type for a visitor.
Get click events for a link.
Get aggregated stats for a link.
List recent events for a workspace.
List links for a workspace.
List partners for a workspace.
List recent visitors for a workspace.
Register a callback for an event type.
Pass async: true to register a slow, side-effecting hook that runs
fire-and-forget off the sync redirect budget (see GoodAnalytics.Hooks).
Resolve tracking signals to a single visitor record.
Returns the PostgreSQL schema name used by GoodAnalytics tables.
Get source platform/medium breakdown for a workspace.
Record a tracking event.
Track a lead (signup).
Accepts an optional keyword list as the third argument:
:connector_signals— explicit connector signal overrides
Track a sale.
Accepts an optional keyword list as the third argument:
:connector_signals— explicit connector signal overrides
Update a link.
Update a partner, scoped to a workspace.
Update visitor attribution (extension point for GoodPartners).
Update visitor lifecycle status.
Get the attribution path for a visitor.
Get the full event timeline for a visitor.