Plausible

Retrieve website analytics stats from Plausible.

AnalyticsAPI key16 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (16)
  4. create_custom_property
  5. create_goal
  6. create_shared_link
  7. create_site
  8. delete_custom_property
  9. delete_goal
  10. delete_site
  11. get_site
  12. invite_guest
  13. list_custom_properties
  14. list_goals
  15. list_guests
  16. list_sites
  17. list_teams
  18. remove_guest
  19. update_site
  20. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("plausible", action, input) resolves with the provider's answer and rejects when Plausible isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "plausible"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Plausible when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellPlausible = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Plausible isn't connected.
  const output = await step.run("Plausible", () =>
    step.ctx.integrations.invoke("plausible", "create_custom_property", {
      "site_id": "<site_id>",
      "property": "<property name>"
    }),
  );
  step.ctx.log("Plausible answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "plausible",
    "piece_action": "create_custom_property",
    "input": {
      "site_id": "<site_id>",
      "property": "<property name>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/plausible/create_custom_property" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"site_id":"<site_id>","property":"<property name>"}}'

Actions

create_custom_property

Create Custom Property. Create a custom property for a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
propertyrequiredtextName of the custom property

create_goal

Create Goal. Find or create a goal for a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
goal_typerequiredone of "event" | "page"Type of goal to create
event_nameoptionaltextName of the event (required if goal type is Event)
page_pathoptionaltextPage path to track (required if goal type is Page). Supports wildcards.
display_nameoptionaltextCustom display name for the goal in the dashboard

Create Shared Link. Find or create a shared link for a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
namerequiredtextName of the shared link (e.g., Wordpress)

create_site

Create Site. Create a new site in your Plausible account

InputTypeDescription
domainrequiredtextDomain of the site (must be globally unique)
timezoneoptionaltextTimezone name according to IANA database (e.g., Europe/London). Defaults to Etc/UTC
team_idoptionalid (picked from your account)Select a team
track_404_pagesoptionalbooleanEnable tracking of 404 error pages
hash_based_routingoptionalbooleanEnable hash-based routing for single-page applications
outbound_linksoptionalbooleanTrack clicks on outbound links
file_downloadsoptionalbooleanTrack file downloads
form_submissionsoptionalbooleanTrack form submissions

delete_custom_property

Delete Custom Property. Delete a custom property from a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
propertyrequiredid (picked from your account)Select a custom property

delete_goal

Delete Goal. Delete a goal from a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
goal_idrequiredid (picked from your account)Select a goal

delete_site

Delete Site. Delete a site and all its data from your Plausible account. This action is permanent and may take up to 48 hours to complete.

InputTypeDescription
site_idrequiredid (picked from your account)Select a site

get_site

Get Site. Get details of a site including tracker script configuration

InputTypeDescription
site_idrequiredid (picked from your account)Select a site

invite_guest

Invite Guest. Invite a guest to access a site or find an existing invitation

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
emailrequiredtextGuest's email address
rolerequiredone of "viewer" | "editor"Role to assign to the guest

list_custom_properties

List Custom Properties. Get a list of custom properties for a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site

list_goals

List Goals. Get a list of goals for a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site

list_guests

List Guests. Get a list of guests for a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site

list_sites

List Sites. Get a list of sites your Plausible account can access

No input.

list_teams

List Teams. Get a list of teams your Plausible account can access

No input.

remove_guest

Remove Guest. Remove a guest or invitation from a site

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
emailrequiredid (picked from your account)Select a guest

update_site

Update Site. Update an existing site in your Plausible account

InputTypeDescription
site_idrequiredid (picked from your account)Select a site
new_domainoptionaltextNew domain name for the site (leave empty to keep current)
track_404_pagesoptionalbooleanEnable tracking of 404 error pages
hash_based_routingoptionalbooleanEnable hash-based routing for single-page applications
outbound_linksoptionalbooleanTrack clicks on outbound links
file_downloadsoptionalbooleanTrack file downloads
form_submissionsoptionalbooleanTrack form submissions

Details

Id
plausible
Category
Analytics
Tags
analytics, privacy, open-source, stats
Package
@activepieces/piece-plausible@0.0.5
Runs
Through the integration runner