Target pages with URL rules
Every campaign has URL rules that decide which pages it runs on. Use this page to choose the right rule for one page, a group of pages or your whole site, and to understand how schedules and priority decide which campaign a visitor sees.
URL rule modes
Section titled “URL rule modes”A campaign can have one or more URL rules. The campaign runs on a page when any of its rules matches the page address.
| Mode | Matches when | Example rule | Matches |
|---|---|---|---|
| Exact URL | the page address equals the rule | https://shop.example.com/basket |
/basket, /basket/, /basket#summary |
| URL starts with | the page address begins with the rule | https://shop.example.com/offers |
/offers, /offers/weekend, /offers-archive |
| URL contains | the rule text appears anywhere in the page address | breakfast |
/recipes/breakfast, /breakfast-deals |
| Entire site | the page is on the same site as the rule | https://shop.example.com |
every page on shop.example.com |
A campaign created in the dashboard for one page has a single Exact URL rule. There is no regular expression mode and no wildcard syntax. To cover a group of pages, use URL starts with, URL contains, or several rules.
How addresses are compared
Section titled “How addresses are compared”Before comparing, Grona normalises both the page address and the rule:
- The
#fragmentand trailing slashes are ignored. www.and the bare domain are treated as the same host, sohttps://www.shop.example.com/basketmatches a rule forhttps://shop.example.com/basket.- UTM tags and ad-click ids are ignored:
utm_*,gclid,gbraid,wbraid,gad_source,gad_campaignid,dclid,fbclid,msclkid,ttclid,twclid,li_fat_id,ScCid,epik,igshid,mc_cid,mc_eid,_gl,srsltidandyclid. - Grona’s own
vmarker parameter is ignored.
Everything else counts:
- Other query parameters are kept. For Exact URL, they must match too.
https://shop.example.com/search?q=milkdoes not match a rule forhttps://shop.example.com/search. Use URL starts with if the page can carry extra parameters. - Paths are case-sensitive.
/Offersand/offersare different pages. Host names are not case-sensitive. - The scheme matters.
http://andhttps://do not match each other under Exact URL, URL starts with or Entire site.
Several pages and exclusions
Section titled “Several pages and exclusions”To run one campaign on pages that do not share a prefix, add a rule for each page or group. Rules combine with OR, so the campaign runs wherever any rule matches.
Campaigns with audience rules can also exclude pages, using the same four modes. A page is covered when an include rule matches and no exclude rule does. A page that is excluded is not enrolled, so the next campaign in priority order can run there. A tagged link, such as one carrying a gclid, cannot slip a visitor past an exclusion.
Campaigns created through the Public API use their own multi-page rule, which compares a part of the path against a list of names. See Create campaigns from your platform.
Query parameter and UTM rules
Section titled “Query parameter and UTM rules”URL rules ignore UTM tags. To run a campaign only for visitors who arrive from a particular link, add UTM rules or a query parameter condition.
- UTM rules gate a campaign on the UTM tags in the address. A campaign can have several UTM rules: the visitor passes when any one rule matches, and a rule matches only when all of its tags match. Values are compared without regard to case. A malformed query string never passes. A campaign with no UTM rules has no UTM gate.
- Query parameter conditions are part of audience rules. They can check that a parameter equals a value, is one of several values, is known or is unknown. Values are trimmed and compared without regard to case. A missing parameter never equals anything.
For example, a weekend breakfast banner for visitors from a newsletter could use a URL rule of URL starts with https://shop.example.com/ and a UTM rule of utm_source = newsletter and utm_campaign = weekend_breakfast.
Schedules
Section titled “Schedules”A campaign can have a start time and an end time. Both are stored in UTC and checked against the visitor’s own device clock when the page loads. Nothing on the server checks them for each visit, so a visitor whose clock is wrong can see a campaign early or late.
Pausing, ending or editing a campaign changes the script that Grona serves for your workspace. Visitors pick up the change on their next page load once the CDN serves the new script. A page that is already open keeps running the old one.
Priority
Section titled “Priority”When several campaigns cover the same page, priority decides which one runs. Set it in the dashboard’s priority order for the site.
- A lower number means a higher priority. The campaign at the top of the priority order is checked first.
- The first campaign that enrols the visitor wins that page view. Campaigns with a lower priority do not run on it.
- A campaign that covers the page but does not enrol the visitor, for example because its audience rules or UTM rules do not match, lets the next campaign run.
- An error in one campaign does not stop the campaigns below it.
If a campaign never seems to run, check whether a higher-priority campaign with no audience rules covers the same page. It takes every visitor first.