> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trygravity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Best practices

> How to test, write context, choose audiences, and set up measurement on Gravity.

This page covers how to choose an objective and set up measurement, write ad group context, use audiences, and run tests. For the settings themselves, see [Campaigns](https://docs.trygravity.com/advertisers/campaigns.md).

## Objectives and measurement

| Objective | Gravity optimizes for | You pay |
| - | - | - |
| **Clicks** | Clicks | Per 1,000 impressions (CPM) |
| **Reach** | As many different people as possible | CPM |
| **Conversions** | A conversion event you pick | CPM |
| **CPA** | A conversion event you pick | Per conversion that Gravity attributes to your ads |

For details and who can use CPA, see [Campaign objective](https://docs.trygravity.com/advertisers/campaigns.md#campaign-objective).

### Set up the conversion event before you launch

Send conversion events from your server through the [Conversions API (CAPI)](https://docs.trygravity.com/advertisers/server-conversions.md), or through an [integration](https://docs.trygravity.com/advertisers/integrations.md) such as Shopify, Stripe, or Cal.com. The [pixel](https://docs.trygravity.com/advertisers/pixel.md) measures website (browser) activity.

A Conversions or CPA campaign launches only after Gravity receives the event you picked from your server or an integration. See [Conversion event check](https://docs.trygravity.com/advertisers/campaigns.md#conversion-event-check). You can't change the event after launch, and learning counts only that event.

## Context

Gravity uses each ad group's context to find relevant conversations and to generate ads. It matches the context against what the user is talking about, filters out poor matches, and then runs the auction.

### How many ad groups to create

Create one ad group for each distinct product or use case, not one for each rewording. Two ad groups with related context compete for the same conversations and split the evidence, so both learn more slowly.

### Write good context

* Write 4 to 8 factual sentences: what the product is, its key features, who uses it, how they use it, and any lasting constraints, such as where it's available.
* Use the plain facts someone might bring up in a conversation. Most contexts are 450 to 800 characters. A longer context isn't a better one.
* Leave out slogans, keyword lists, headlines, and facts about other ad groups.
* Leave out seasonal discounts and other promotions. Context should stay true for as long as the ad group runs. Put promotions in an [offer](#offers).

```text Good theme={null}
Carbon-plated trail running shoe with a grippy outsole and a wide toe box.
It weighs 260 grams and has a 6 mm heel-to-toe drop.
The outsole uses deep lugs that hold on wet rock, mud, and loose gravel.
The wide toe box leaves room for feet to swell on long runs.
Trail runners use it for ultramarathons, mountain races, and long training days.
It comes in standard and wide sizes for men and women.
```

```text Weak theme={null}
The best shoes in the world. Run faster. Shoes, sneakers, running, sport.
```

## Offers

An offer is an optional promotional term that you put in your ad copy, such as a discount or a free trial. Context describes the product. The offer says why to act now.

A strong offer states:

* **A concrete benefit**, such as an amount, a percentage, or a trial length.
* **Who is eligible**, such as new customers only.
* **When it ends or its limits**, such as an end date or one use per customer.
* **How to redeem it**, such as a code at checkout or an automatic discount.

```text Example theme={null}
20% off your first order for new customers.
Use code WELCOME20 at checkout. Ends December 31.
```

Make sure the landing page shows the same offer. If the ad promises a discount, the page people land on should show it, with the same terms.

To use an offer, write it into the headline, copy, or call to action of a static ad. Keep it out of the context. When the offer ends, pause the ad group (or campaign) that uses it.

## Audiences and targeting

You set targeting on the campaign, and it applies to every ad group in that campaign:

| Setting | What it does |
| - | - |
| **Locations** | Countries or regions where ads can serve. None selected means all countries. |
| **Devices** | iPhone, Android, or desktop. None selected means all devices. |
| **Audiences** | Include or exclude people from audiences that you build on the **Audiences** page. See [Audiences](https://docs.trygravity.com/advertisers/campaigns.md#audiences). |

### Start broad

Start with locations and good context, then add audiences as you learn what works. Both kinds are fine to use:

* An **include** audience shows the campaign only to members of that audience. Use it for retargeting, such as people who visited your site or clicked your ads.
* An **exclude** audience keeps the campaign away from members of that audience, such as existing customers or recent converters.

## Experimentation

You run tests by setting up the variants yourself:

* **To test context or creative, use two ad groups in one campaign.** Each ad group has its own context and ads. Gravity divides the campaign budget across ad groups automatically, so compare cost per result and CTR, not totals.
* **To test the objective, conversion event, CPA, or budget, use two campaigns.** These settings belong to the campaign, and you can't change the objective or the conversion event after launch (see [Objectives and measurement](#objectives-and-measurement)).

### Give each variant enough budget

A campaign leaves its learning period when it collects enough evidence:

| Objective | Learning ends after |
| - | - |
| **Conversions**, **CPA** | 10 conversions (results) |

Plan enough budget for each variant to get there. For example, at about $40 per result, each Conversions variant needs at least $400 of spend.

### Keep these settings fixed during a test

These changes may interfere with the learning phase:

* The CPA, on a CPA campaign.
* The maximum cost per click, on a click-billed campaign.

Pausing the campaign or making large budget changes may also interfere with the learning phase, so keep the budget steady and the campaign running until the test ends.

### Give the learning phase time

Learning can take up to 2 to 3 months. Performance moves around and costs run higher until it ends, so give a campaign time before you judge it.

## Common mistakes

1. Changing the CPA during a test.
2. Using ad copy, slogans, or keyword lists in context.
3. Planning to launch a CPA or Conversions campaign with only pixel events (server-side tracking is required).
4. Not giving the learning phase time. Learning can take up to 2 to 3 months.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.