Actions
Give one name to the events that mean the same thing, such as every click on a sign-up button, and use it in any insight.
An action is a named set of events. It turns raw data, such as autocaptured clicks or pageviews of a certain address, into something your team recognises: "Clicked Start trial" or "Viewed pricing".
Actions are worked out when you query, not when events arrive, so a new action covers your past events as well as future ones.
When to use an action
- To name autocaptured clicks. Pick out the clicks on one button by its text, link or selector.
- To combine events. Count "Signed up" whether it came from your website form or your app's event.
- To follow a page. Treat every pageview of
/pricingas "Viewed pricing". - To keep definitions in one place. Change the action, and every insight that uses it updates.
Create an action
- Open Data → Actions and click New action.
- Choose From event or pageview to define it here, or Inspect element on site to open your site with the toolbar and click the element you want.
- Give the action a name.
- Add one or more match groups, described below.
- Click Save.
The action page shows a sample of Matching events, so you can check it catches what you expect.
Match groups
An action is triggered when an event matches any of its match groups. Each match group is one of these kinds:
| Kind | Matches |
|---|---|
| Autocapture | Autocaptured clicks, changes and submissions on the elements you describe. |
| Pageview | Pageviews, optionally of a certain page address. |
| Other events | Events with a name you choose, such as your own custom events. |
For Autocapture, describe the element with any of:
- Element text, such as
Start trial; - Element link target, the address the link points to;
- Element matches tag name, such as
button; - Element matches HTML selector, a CSS selector such as
[data-attr="start-trial"]; - Page URL, the page the element was on.
Within one match group, every condition you fill in must match. Text, link and page address can match exactly, by regular expression or by containing a value. Every match group can also have Filters on event or person properties.
Use an action
Actions appear wherever you choose an event: trends, funnels, retention, paths, cohorts and filters. Look for them under Actions in the event picker.
An action can also trigger a destination, sending matching events to another tool as they arrive. Connected destinations are listed on the action's page.
Related
Can't find what you need? Contact support