Set up a meter
A meter counts reads, such as articles opened. You declare it once in Revenue › Decision Engine › Meters: its name, its kind, whose reads it counts and on which sites. It has no number and no period. Each rule that reads it sets its own allowance and period, so two rules can read one meter over two windows.
The Meters list
Section titled “The Meters list”Each row is one meter, with its Kind, what it Counts (whose reads, on which sites, and what sign-in does), the rules it is Read by, the rules it is Spent by, and its State. A meter no rule counts on is marked never advances: every read of it answers the same way.
Declare a meter
Section titled “Declare a meter”- Select New meter.
- Enter a Name, such as
articles. Rules read and count the meter by name, so a rename later leaves them pointing at nothing until you change them. - Pick a Kind:
count: a number. Each counted read adds one, including a second read of the same article.seen-set: the set of keys already counted. A second read of the same key adds nothing, and a rule can test whether this page’s key is already on the meter. The key comes from a signed content fact, so the user cannot change it. Remembers lists no fact to pick, so Create meter stays disabled for aseen-set. Switching an existing meter toseen-setkeys it onsigned.article_id. A read whose request carries no value for the key fact is never counted on aseen-setmeter, and no request carries one unless EdgeKit has set up signed content facts for your organization. Until then its count stays at zero, so is under any allowance above 0 always holds.
- Pick what it Counts:
device: every device, by its device cookie. See Whose count.user: signed-in users only. An anonymous request is never counted, and a rule reading it sees zero.gift_link: each gift link has its own count. A request with no valid gift link is never counted. See Gift links.
- Pick the Sites: Every site, or the ones you choose. The meter is one count across all of them. A feature that reads the meter on a site outside that set is refused at stage.
- For a
devicemeter, pick what happens On sign-in:reset: the signed-in user starts from zero. The device’s count stays with the device.carry: the first time a rule reads the meter for the signed-in user, the count of the device they are on becomes theirs. Later devices add nothing to it. A request that carries a newsletter link counts on the user the link was sent to, as if signed in, and never carries the device’s count. If that is the first count the user has, a later sign-in finds it and carries nothing either.
- Select Create meter.
A new meter starts left out of the next deploy and counts nothing. Open it, select Include in deploy, then stage and deploy. Until then no rule can read or count it, and a feature that does is refused at stage.
Read a meter from a rule
Section titled “Read a meter from a rule”In a rule’s when, pick the meter, then what to test:
| Test | Holds when |
|---|---|
| is under n | Fewer than n reads are counted in the period |
| has reached n | n or more reads are counted in the period |
| already holds this key | This page’s key is counted in the period. seen-set meters only |
- Allowance: n, a whole number from 0 to 1,000. is under and has reached need one.
- Period: in the last 1 to 365 days, today, this week (from Monday) or this month. Today, this week and this month start at midnight in your organization’s meter time zone, set on the site screen. See Meter time zone.
- Count a read if this rule wins: count this read when this rule is the one that answers. A rule that only tests the meter never moves it.
A canvas entry may not read a meter. Count a read if this rule wins works only on a test at the top of the rule, not inside a group or a segment.
Three free articles in any 30 days for anonymous devices is one rule in their canvas, plus the canvas’s outcome for everyone else:
- Rule
metered:articlesis under 3, in the last 30 days, Count a read if this rule wins. Returnsmetered-access. - else: returns
register-prompt.
How a meter counts
Section titled “How a meter counts”- Only the winning rule counts. A meter moves when the rule that answered has Count a read if this rule wins on it. Rules and canvases that did not answer count nothing.
- Once per request. However many features in one request count on a meter, it moves once.
- After every feature has decided. Every feature in a request reads the count from before the request, and the
decision’s
metersshows that count.allowance - countis what was left. - Every request counts. Asking again, or retrying a request that already got an answer, counts again on a
countmeter. Aseen-setmeter counts each key once per period. - Not under a grant. By default, a user who holds any live grant counts on no meter, except a
gift_linkmeter, so a paying user never uses up an allowance they cannot see. A rule can still test the meter for them. - Never from a flag or a redirect. An operational feature and a journey feature may not count on a meter. Stage refuses one that does.
- Kept for 366 days. A meter keeps each subject’s counted reads for 366 days, and at most 1,000 of them. Past 1,000, the oldest are dropped.
Counts are not configuration. They are written as users read, a deploy never resets them, and a renamed meter starts from zero.
Count a habit
Section titled “Count a habit”A seen-set meter keyed on a request fact counts a habit instead of an allowance: the different days a device came
back, or the different ways it arrived. Two such meters, both counting device with carry on sign-in:
active_days, keyed onrequest.date: one key per day, so it holds the days the device was active.sources, keyed onrequest.referrer_class: one key per way of arriving, such assearchoremail.
A feature that only counts moves them, here ai_paywall_meters. It has one canvas for everyone and two rules, and
returns counted, a data outcome, whichever answers:
- Rule
external-arrival:request.referrer_classis one ofsearch,social,email,paidorchatbot;sourcesis under 1,000, in the last 1 day, Count a read if this rule wins;active_daysis under 1,000, in the last 30 days, Count a read if this rule wins. - Rule
any-arrival:active_daysis under 1,000, in the last 30 days, Count a read if this rule wins.
The allowance of 1,000 is never reached, so each test always holds: it is there because only a rule’s meter test
counts. Name the feature beside your paywall in every decide request and ignore its answer. A rule in your paywall
then reads the habit, for example active_days has reached 3 in the last 30 days.
- Count over a day, read over any period. A
seen-setcounts each key once per period of the rule that counts it, and keeps that first tick. Asourcescounted over 30 days tickssearchon day 0 and not again on day 29, so a 30-day read on day 31 finds no search arrival. - The meter screen cannot key a meter on a request fact. Declare these meters in a config tree.
request.referrer_classis unverified. Anyone can send a referrer, so a device can add a source it never came from. Use a habit to choose between outcomes that do not open content. See How the request arrived.
Whose count
Section titled “Whose count”| Counts | Anonymous device | Signed-in user |
|---|---|---|
device |
The device’s count | The user’s own count, the same on every device. reset starts it at zero, and carry copies the device’s count once |
user |
Zero, and nothing is counted | The user’s own count, the same on every device |
gift_link |
The gift link’s count, when the request carries a valid one | The same: the gift link’s, not the user’s |
A device is known by its device cookie, which EdgeKit Analytics sets when your site’s tracker sends events. A request
without the cookie gets request.new_device true, and every request without one shares a single count. So a
device meter counts each browser separately only once the tracker runs on your pages.
The device cookie is not signed. Clearing cookies, a new browser or a private window is a new device with a fresh
count. EdgeKit accepts this: a determined user can always start a device count again. A device meter that should
reach across your sites does so only on sites that share the cookie’s domain, so sites on different domains see
different devices. Only a user meter is the same everywhere.
Change a meter
Section titled “Change a meter”Open it from the list. Every change is written to the draft as you make it, and reaches your sites at the next deploy.
- Kind: switching does not convert what is already counted. A meter that becomes a
seen-sethas no key for its earlier reads, so together they count as one. A meter that becomes acountkeeps how many and forgets which, so a second read of an article already opened now counts. - Leave out of next deploy removes the meter from the next deployment. It keeps counting until that deploy.
- Read by and Spent by list the rules that test the meter and the rules that count on it.
Delete a meter
Section titled “Delete a meter”Select Delete meter, type the meter’s name, then select Delete meter again. When rules still read or count it, stage refuses the draft until they no longer name it. A deployed meter keeps counting until the next deploy.