- Documentation
- Integrations
- Apps
- Plausible Analytics integration
Plausible Analytics integration
Track events, query visitor stats, and provision sites, goals, and client dashboards across your clients' Plausible Analytics accounts.
What it does
The Plausible Analytics integration lets your agency run privacy-friendly analytics operations on behalf of your clients without leaving TaskJuice. Connect a client's Plausible site once and you can track server-side events and goals, run v2 Stats API queries with full dimension and filter control, fetch aggregate metrics over a period, pull day-bucketed timeseries, and break a metric down by page, source, country, or any other Plausible property. With the Sites API you can also onboard a new client end to end: add their site, set up goals and custom properties, invite them as a guest, and hand them a shared dashboard link. A daily polling trigger snapshots the timeseries so you can fan out scheduled digests, retention reports, or anomaly alerts to the rest of your workflow.
Connect a Plausible account
- Open your workspace in TaskJuice and navigate to Connections.
- Choose Plausible Analytics and click Connect.
- Pick the right host. Use
https://plausible.iofor Plausible Cloud, or the base URL of a self-hosted Plausible install. - In Plausible, open the account menu, choose Settings, scroll to API Keys, generate a new Stats API key, and paste the value into TaskJuice. Stats API access requires a Business plan.
- Enter the client's site domain exactly as it appears in their Plausible dashboard (for example
example.com). Plausible uses this domain as thesite_idon every Stats API request.
Stats API key or Sites API key
Plausible issues two kinds of API key, and either one works in this connection:
- A Stats API key (Business plan) runs every stats action and every read-only Sites API action: list sites, get a site, list teams, goals, custom properties, and guests.
- A Sites API key (Enterprise plan) runs all of the above plus the provisioning actions: create, update, and delete sites, goals, custom properties, guests, and shared links. Ask Plausible to enable the Sites API for your team, then create the key under Settings → API Keys → New API Key → Sites API.
A provisioning action run with a Stats API key fails with a payment-required error that names the missing plan feature.
See the Plausible Stats API docs for the full key-scoping flow and the rate-limit budget.
Triggers
plausible/daily-stats-snapshotpolls the Plausible timeseries endpoint each cycle and emits one activation per cycle withitemscarrying every day-bucket observed in the configured lookback window. Pick the site, period, metrics, and poll interval per workflow. For a self-hosted instance, set Plausible Host under Plausible instance to the same host as your connection (for exampleanalytics.example.com).
Plausible does not push event webhooks, so polling is the supported trigger shape. Day-bucket granularity means an hourly or daily interval is appropriate; sub-hourly polling burns the Stats API budget without surfacing new data.
Actions
plausible/track-eventposts a pageview or custom event to Plausible's Events API. Supply the event name (pageviewor any custom event name), the full page URL, and optionally a referrer, up to 30 custom properties, revenue ({"currency": "USD", "amount": "19.99"}) for a revenue goal, and whether the event is interactive. When sending from a server, also pass the visitor's real User-Agent and IP.plausible/query-statsruns a v2 Stats API query. Supply metrics, date range, optional dimensions, filters, ordering, and pagination. Returns one row per dimension tuple.plausible/get-aggregatereturns aggregated metrics (visitors, pageviews, bounce rate, visit duration, events) over a preset or custom period. Optionalcompare=previous_periodadds period-over-period change, and Include Imported Data adds stats imported from Google Analytics or CSV.plausible/get-timeseriesreturns a series of metrics bucketed by day, or by month for periods longer than a calendar month.plausible/get-breakdownreturns metrics broken down by one property (page, source, country, browser, device, UTM tag, goal, or a custom property), up to 1,000 rows per page with page-number pagination.
Sites, goals, and client access
Every action below picks its site from a dropdown of the sites your key can access. Goal, custom property, and guest pickers load once you pick a site.
plausible/list-siteslists the sites the key can access, optionally limited to one team. Turn on Return all to page past the first 100.plausible/get-sitereturns a site's timezone, allowed custom properties, and tracker script configuration.plausible/list-teamslists your teams and whether the Sites API is enabled for each.plausible/create-siteadds a new site with an optional timezone, team, and tracker script options (outbound links, file downloads, form submissions, 404 pages, and more). The response includes the tracker script ID to install on the client's site.plausible/update-sitechanges a site's domain or tracker script options. Options you leave empty keep their current value.plausible/delete-sitepermanently deletes a site and all of its analytics data. Plausible cannot restore it, so set the step to Pause for approval if a person should confirm it first.plausible/list-goals,plausible/create-goal, andplausible/delete-goalmanage conversion goals. Create Goal is idempotent: running it twice returns the existing goal instead of a duplicate.plausible/list-custom-properties,plausible/add-custom-property, andplausible/delete-custom-propertymanage the custom properties a site reports on.plausible/list-guests,plausible/invite-guest, andplausible/remove-guestmanage who can see a site's dashboard. Inviting a guest emails them immediately.plausible/create-shared-linkreturns a named, shareable dashboard URL for a client report or portal embed. Running it again with the same name returns the same link.
Known limitations
- Stats API access is a Business plan feature. Free and Starter plans can use the Events API endpoint but not the query, aggregate, timeseries, or breakdown endpoints.
- Sites API provisioning (creating, changing, or deleting sites, goals, custom properties, guests, and shared links) is an Enterprise plan feature, and it is not available on self-hosted Community Edition installs.
- A Sites API key only manages sites owned by the team it was created in.
- The real-time "current visitors" count is not available as an action. Use Query Stats with a short custom date-time range instead.
- Stats API keys default to a 600 requests per hour budget. When the budget is exhausted Plausible returns a 429, which TaskJuice surfaces as a retryable error so downstream resilience policies can back off.
- The Events API does not require an API key; it identifies the destination site by the
domainvalue in the request body, which TaskJuice fills from the connection's site ID. - When ingesting events from a server, supply the original client User-Agent and IP. Forwarding your own server's IP causes Plausible's bot filter to drop the event, and Plausible still answers 202. Track Event exposes the
x-plausible-droppedresponse header asmeta.headers['x-plausible-dropped']on the step; a value of1means the event was dropped. - Self-hosted Plausible instances must be reachable from TaskJuice's network. Behind-VPN or local-only deployments are not supported.
- Plausible does not push event webhooks. Realtime fan-out is not possible; use the polling trigger or the action set inside a scheduled workflow.