Skip to content
Peekbird

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

TypeCounts
Page visitEach view of a page that matches its URL rules.
Element clickEach click on an element matching a CSS selector, or on anything inside it.
Link clickEach click on a link whose destination matches its URL rules.
Form submissionEach 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 depthScrolling 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 pageThe 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.
InteractionClicking, typing into or submitting anything, once per page view.
Custom JavaScriptEach peekbird.convert() call in your own code (below).
Custom eventEach event your site sends with the goal's event name.
RevenueEach 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 byOn a revenue goalMeans
Conversion ratePurchase rateThe share of visitors with at least one conversion.
Conversions per visitorOrders per visitorConversions divided by visitors, so repeats count.
Total valueRevenueEverything added up. Compared per visitor, so an uneven split doesn't skew it.
Value per visitorRevenue per visitorThe total divided by every visitor in the variation, including those without a conversion.
Value per conversionAverage order valueThe 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.

GroupConditions
VisitorNew or returning, Visit number, Days since first visit, Pages viewed this visit. A visit ends after 30 minutes without a page view.
TechnologyDevice, Browser, Operating system, Screen width (px), which is the browser window's width, and Browser language.
LocationCountry, Region / state, City (below).
Traffic sourceTraffic source (Direct, Search, Social, Email, Paid, Referral), Referrer URL, UTM source, medium, campaign, term and content, as of the visit's first page.
PageURL query parameter, Cookie: each by its name.
TimeDay of week, Hour of day (0–23), in the visitor's time zone.
CustomCustom 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.

See what your visitors see.

Start free in a few minutes: one snippet, every feature. Move to a bigger plan when you need more tracked visits.