How to create an action in PostHog

Learn how to create an action in PostHog that groups events like task_created and task_completed under one name using match groups.

Quick answer

To create an action in PostHog, open the Actions page and click Create your first action. Name it, pick Other events, choose an event, add a second match group for another event, then click Save. The action matches either event, so one named action covers both task events at once.

Steps at a glance

  1. Open the Actions page and click Create your first action.
  2. Type a name for the action.
  3. Open the event picker in Match Group #1.
  4. Choose task_created.
  5. Add a second match group.
  6. Choose task_completed in the new group.
  7. Click Save.

Interactive demo

Loading demo…

Summary

An action in PostHog bundles one or more events under a single name. Each match group adds a condition, and the action triggers when any group matches. It keeps your analysis readable when several events mean the same thing to your team.

Step-by-step guide

  1. Step 1

    Create your first action

    Open the Actions page. With no actions yet, the page shows a Create your first action link. Click it to open the action editor.

  2. Step 2

    Name the action

    Click the Enter name field at the top and type a clear name, such as Created or completed a task. Match Group #1 below it starts on Pageview, with Other events available beside it.

  3. Step 3

    Open the event picker

    In Match Group #1, choose Other events. The Event name field shows All events. Click it to open the list of events PostHog has received.

  4. Step 4

    Choose task_created

    Pick task_created from the list. The first match group now triggers on that event.

  5. Step 5

    Add a second match group

    Click Add match group. A second group, Match Group #2, appears next to the first and is joined to it with or.

  6. Step 6

    Match another event

    In Match Group #2, choose Other events so the group can match a named event instead of a Pageview.

  7. Step 7

    Choose task_completed

    Open the event name field in Match Group #2 and pick task_completed. The action now matches either event.

  8. Step 8

    Save the action

    Click Save at the top right. The Matching events panel lists recent events that fit the action.

Why this matters

You track task_created and task_completed separately, but your team thinks of both as task activity. Grouping them into one action means you can refer to that activity by a single name instead of rebuilding the same two-event filter each time.

Frequently asked questions

  • Can one action match more than one event?

    Yes. Add a match group for each event. The groups are joined with or, so the action triggers when any group matches.

  • Where can I see which events an action matches?

    The Matching events panel on the action page lists recent events that match, with a Last 24 hours filter.

Create interactive demos like this one — free, no coding required.

Start for free →