Plausible logo Plausible automation

Set up a new Plausible site with goals

A client launches a new shop, and someone has to add the site in Plausible, then click through the goal form once for the thank-you page and once for every custom event before the first order comes in.

Cotlet does it in your own Plausible account with list_sites, create_site, list_goals and add_goal, called by your AI agent, an n8n workflow or a script.

Hosted · nothing to install or maintain

Can Plausible do this on its own?

Plausible's Sites API can create sites and goals, but it is an Enterprise-only feature (checked 22 Oct 2026). The Stats API, on the Business plan, only reads data. On Starter, Growth and Business, sites and goals are created by hand in the app.

How you do it in Plausible today

  1. On the Sites page, an admin clicks + Add a website and types the bare domain, without https:// or www.
  2. The admin adds the tracking script to the website, the next step in the Get Started guide.
  3. In the site settings, the admin opens Goals and clicks + Add goal, then picks Pageview or Custom event as the trigger.
  4. For a pageview goal the admin types the page path or picks it from the dropdown, optionally edits the Display Name, and clicks Add goal. For a custom event goal the admin types the event name exactly as the website sends it.
  5. The admin repeats the form for every goal. A typo in an event name, or a goal added after launch, means conversions that were never counted.

How to set up a new Plausible site with goals

Prompt

Add shop.acme-shop.example to Plausible in the Europe/Warsaw timezone, then add a pageview goal for /checkout/thank-you called "Checkout complete" and a custom event goal "Newsletter Signup".
  1. 01

    Check the domain first

    The agent lists your sites with list_sites. If the domain is already there, it stops and tells you instead of adding a second site. It also strips https:// and www. from what you typed, and treats a subdomain as its own site, so blog.acme-shop.example is not added by mistake when you meant the main domain.

  2. 02

    Add the site

    create_site adds the domain with the reporting timezone you named. The site stays empty until the tracking script is on the website, which the agent cannot do, so it ends the run with that reminder.

  3. 03

    Read the existing goals

    list_goals returns what is already set up, so the agent skips a goal whose path or event name is taken. On a fresh site the list is empty, and on an old site it saves you from duplicates.

  4. 04

    Add each goal

    add_goal runs once per goal. Paths go in as shown in your dashboard, with an asterisk for a pattern such as /blog*. Event names go in with your exact capitalisation, and the agent asks when you wrote one in a different case than the prompt. A goal reaches no one, so it does not wait for your OK.

  5. 05

    Report what to trigger

    Plausible shows a goal only after its first conversion and does not backfill. The agent returns the goals it added with a note to load the thank-you page and fire each event once to see them appear.

What you get back

Example data

Added site shop.acme-shop.example (Europe/Warsaw)
Goals added:
- Checkout complete: pageview /checkout/thank-you
- Newsletter Signup: custom event Newsletter Signup
Skipped: none already existed
To do: add the tracking script to the website, then load /checkout/thank-you once to see the first conversion.

Other ways to ask

  • Add the same three goals to every site in my team that does not have them yet.
  • Add a pageview goal for /blog* called "Blog reader" on acme-shop.example.
  • List the goals of acme-shop.example and tell me which ones have no conversions this month.

What Plausible allows, and what to know first

  • Plausible wants the bare domain in the site form, so https://www.yourdomain.com becomes yourdomain.com.
  • A subdomain entered on its own, such as blog.yourdomain.com, is tracked as a separate site from the main domain.
  • A pageview goal path must match the path shown in the Plausible dashboard, and an asterisk can sit at the start, the end or the middle of it.
  • A custom event goal name must match the name the website sends exactly, including capitalisation.
  • Plausible does not backfill custom events: counting starts when the goal is created.

create_site and add_goal change only your own Plausible data and reach no one else, so they run without asking first.

Sources: Plausible Docs: Add your website · Plausible Docs: Pageview goals · Plausible Docs: Custom event goals · Plausible Docs: Sites API

Call add_goal from a script

curl

curl -X POST https://cotlet.dev/api/v1/plausible/goals \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site":"acme-shop.example","trigger":"pageview","target":"/checkout/thank-you","display_name":"Checkout complete"}'

Example response

{
  "site": "acme-shop.example",
  "name": "Checkout complete",
  "trigger": "pageview",
  "target": "/checkout/thank-you",
  "status": "added"
}

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is plausible_write → add_goal. Example data.

Schedule it in n8n, Make, Zapier or cron

Plausible tools this automation uses

Cotlet Plausible tools used to set up a new Plausible site with goals
Tool Parameters
list_sites team
create_site domain, timezone
list_goals site
add_goal site, trigger, target, display_name
All 14 Plausible tools with descriptions

Frequently asked questions

Is it safe to connect Plausible to Cotlet?

Yes. You sign in to Plausible yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Plausible once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

Give your agent access to Plausible.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Plausible.