Goals and audiences
A goal is what a test is judged on: a page visit, a click, an order. An audience decides who takes part. Both belong to your site, under Goals and Audiences, and any of its experiments can use them.
Goal types
| Type | Counts |
|---|---|
| Page visit | Each view of a page that matches its URL rules. |
| Element click | Each click on an element matching a CSS selector, or on anything inside it. |
| Link click | Each click on a link whose destination matches its URL rules. |
| Form submission | Each submission of a form matching a CSS selector, or of any form. It counts what the browser sends: for successful ones only, use a page visit goal on the confirmation page. |
| Scroll depth | Scrolling 25, 50, 75, 90 or 100% of the way down a page, once per page view. Pages shorter than the screen count as fully seen. |
| Time on page | The seconds you set (up to 3,600) with the page open and visible, once per page view. A background tab's time doesn't count. |
| Interaction | Clicking, typing into or submitting anything, once per page view. |
| Custom JavaScript | Each peekbird.convert() call in your own code (below). |
| Custom event | Each event your site sends with the goal's event name. |
| Revenue | Each order your site sends, with its total. |
Custom events and revenue come from your site: see Other events and Purchases. Every site starts with five standard goals on the purchase event: Purchase rate, Revenue, Revenue per visitor, Average order value and Orders per visitor. All but page visits, custom events and revenue can be limited with Only on some pages, using the same URL rules as experiments.
Bounce rate and engagement rate
Every site also has two goals with nothing to install, worked out from the visit in which each visitor entered the test:
- Bounce rate: the share of visitors who left after one page. Lower is better: a variation with fewer bounces wins.
- Engagement rate: the share of visitors whose visit was engaged, as Google Analytics 4 counts it: 10 seconds of activity (scrolling, moving, clicking or typing), 2 pages or more, or a goal or order completed.
Only that first visit counts, not later ones, so a visitor who bounced and came back the next day still bounced. They work for split-URL tests too: the original page redirects before counting a page view, so the variation's page is the visit's first. For a test decided in your own code, the visitor's first visit with a page after that counts. Activity is measured with Analytics on (the default); with it off, engagement comes from pages and goals alone. Both can be renamed, not deleted, and a test only uses them if you pick them.
What a goal is judged by
Set it in the goal's Judge it by. Every goal can be judged by conversion rate or conversions per visitor; conversion rate is the default. Revenue goals, and custom event goals with Also add up a value, can also be judged by an amount, and default to the amount per visitor. With a unit, like items, the names follow it: Total items, Items per visitor.
| Judged by | On a revenue goal | Means |
|---|---|---|
| Conversion rate | Purchase rate | The share of visitors with at least one conversion. |
| Conversions per visitor | Orders per visitor | Conversions divided by visitors, so repeats count. |
| Total value | Revenue | Everything added up. Compared per visitor, so an uneven split doesn't skew it. |
| Value per visitor | Revenue per visitor | The total divided by every visitor in the variation, including those without a conversion. |
| Value per conversion | Average order value | The total divided by the number of conversions. |
How each is tested is in How results are calculated.
Goals in an experiment
- Each experiment has one primary goal, which decides the winner and is needed to start, and up to 20 secondary goals, which show side effects, good or bad.
- A conversion counts only for visitors in the experiment, from the moment they first see it until it's completed.
- Custom event and revenue goals are matched by event name when results are worked out. They count events sent before the goal existed, and changing a goal's event name changes past results too.
- The other goals are detected on your pages by the snippet, from when the goal is saved. A new or changed goal counts from then on.
- Changing what a goal is judged by changes past results too.
- Event names use letters, digits, _, ., : and -, up to 128 characters, and match exactly: signup and Signup are two goals. Your site can send names with spaces, but no goal can use them.
- Checkout steps, such as begin_checkout and add_shipping_info, are kept once a visit, so a goal on one counts at most once a visit.
- Editing a goal changes it for every experiment that uses it, running ones included. A goal used by a test in QA, running or paused can't be deleted.
Custom JavaScript goals
Your code runs as each page loads, on every page or only on the ones you choose. It calls peekbird.convert() to count a conversion: each call counts, so call it once per conversion. peekbird.waitFor(selector, fn) reaches elements as they appear. The code is checked for syntax errors when you save it. See JavaScript API for both.
Audiences
An audience is groups of conditions: Include visitors who match ALL / ANY of these groups, and each group matches all or any of its conditions. That's up to 20 groups of up to 50 conditions. An experiment can use up to 20 audiences: with several, visitors must match any of them (the default) or all.
| Group | Conditions |
|---|---|
| Visitor | New or returning, Visit number, Days since first visit, Pages viewed this visit. A visit ends after 30 minutes without a page view. |
| Technology | Device, Browser, Operating system, Screen width (px), which is the browser window's width, and Browser language. |
| Location | Country, Region / state, City (below). |
| Traffic source | Traffic source (Direct, Search, Social, Email, Paid, Referral), Referrer URL, UTM source, medium, campaign, term and content, as of the visit's first page. |
| Page | URL query parameter, Cookie: each by its name. |
| Time | Day of week, Hour of day (0–23), in the visitor's time zone. |
| Custom | Custom attribute, sent by your site. JavaScript condition: your code, run in the page before the test starts; return true to include the visitor. Code that throws counts as false. |
How each compares:
- Text (browser language, region, city, referrer, UTM tags, query parameters, cookies, custom attributes): is, is not, contains, doesn’t contain, starts with, ends with, matches regex, is set, is not set. Letter case is ignored, and a missing value counts as empty.
- Choices (new or returning, device, browser, operating system, country, traffic source, day of week): is any of, is none of.
- Numbers (visit number, days since first visit, pages viewed, screen width, hour of day): =, ≠, >, ≥, <, ≤. Custom attributes take these too. A missing value never matches.
- Audiences are checked when a visitor enters a test. Once in, they stay in their variation, even if they stop matching: a new visitor keeps seeing a test for new visitors on later visits.
- Editing an audience applies at once to visitors entering its tests from then on. One used by a test in QA, running or paused can't be deleted.
- Custom attributes come from your site: see Visitor attributes.
Location
Country, region and city come from the visitor's connection, looked up once and remembered for a day. When a test needs them and they aren't known yet, the snippet waits for the answer at most for the anti-flicker timeout (see Speed, CSP and single-page apps); if it doesn't come in time, location counts as not set.
To check one, add ?peekbird_country=DE (any two-letter country code) to a page address: your browser counts as being in that country, for the country only, and its visits count as QA traffic. See QA and preview.
