Facts
A fact is one named value a decision may read, such as user.state or grants.product_ids. A rule, a canvas
entry, a segment and an experiment’s targeting all test facts by their dotted path. The fact registry is the
list of facts your organization’s rules may name. Revenue › Decision Engine › Facts shows it. It is read-only.
Most of the fact registry is EdgeKit’s own, the same for every organization. The rest comes from what your organization declares elsewhere:
| Namespace | Comes from | Trust tier |
|---|---|---|
external.<name> |
The claims your identity provider declares | Attested |
streaming.<pipeline>.<name> |
The streaming inputs your organization declares | EdgeKit |
profile.<name> |
Your profile fields, one fact per field | The weakest fact the field derives |
A rule that names a fact the fact registry does not hold makes staging fail: such a fact would never have a value.
Trust tiers
Section titled “Trust tiers”Every fact has a trust tier, shown as Source on the screen. It says who decides the value, and so how far a rule that opens your content on it can be trusted.
| Tier | Who sets the value | When the value is missing |
|---|---|---|
| EdgeKit | EdgeKit computes it. Nothing a caller sends can move it. | Depends on the fact; see the tables below |
| Signed | Your organization sends it, signed for your site. EdgeKit verifies the signature and never stores the value. | Missing content does not force a deny; a bad supplied signature refuses the request |
| Attested | Your identity provider claims it in a credential EdgeKit verified, true while the credential is; or a verified newsletter link names it. | Read as absent, never an error |
| Unverified | The caller sends it, and EdgeKit passes it through as it arrived. Anyone can set it. | Read as absent |
Signed facts are the content facts your organization declares. Only a product’s coverage condition names them, so the Facts screen does not list them, and today no decision reads them (see Narrow it with a condition). Open a site from Delivery › Delivery › Sites to see them, in the Configuration section of its screen. See Site settings.
Unverified facts are the context.<name> values a decide request carries in context, and the facts in
How the request arrived. The context.<name> values are not in the fact registry: a rule
may name any context.<name>, and staging reports a warning for each one. The browser client’s
context option is the only way a page names the article it is asking about, and anyone who can load the page can
change it. A rule that opens your content on an unverified fact is a way around your own access rules.
When a fact is read
Section titled “When a fact is read”The When column says when EdgeKit reads the value:
- Always loaded: read for every request, before any rule runs.
- Only when asked: fetched only when a rule the request evaluates names it. These are
db_user_org.*,db_user_traits.*,streaming.*andprofile.*. A segment that names one makes every feature naming that segment fetch it.
A fact with no value is handled by its namespace:
streaming.*andprofile.*with no value for this user, or for an anonymous request, are a miss: the condition that reads them does not hold, and nothing errors. A late or lost value never changes an outcome on its own.- A namespace that has no value at all for this request is an error, for example
bot.*on a site with no bot verdict, oritem.*anywhere but a decision about one content item. In the entered canvas, an error answers the canvas’s error outcome when no rule holds.
The ordering tests lt, lte, gt and gte hold only when the fact’s value and the rule’s value are both
numbers. An absent value, an empty string, true, false or a number sent as a string, such as "5", makes them
false; none is read as 0. The equality tests eq and ne compare values as they are.
Who may read what
Section titled “Who may read what”- A feature with the operational purpose may read only facts that EdgeKit computes and always loads. It runs where there is no request to read the rest from.
db_user_org.*may be read only by a feature with the journey purpose.- A feature that reads a
bot.*fact cannot be deployed onto a site that has no bot verdict. - A feature that reads a
centinel.*fact cannot be deployed while your organization has no Centinel key.
EdgeKit’s facts
Section titled “EdgeKit’s facts”EdgeKit computes every fact below. Their trust tier is EdgeKit, except newsletter_link.*, which is Attested. The
request facts read from headers are in How the request arrived.
The user, the device and the site
Section titled “The user, the device and the site”| Fact | Type | Value |
|---|---|---|
site.id |
string | The site the request selected. |
user.id |
string | The user the decision is for. Absent when nobody is signed in. |
user.state |
enum | anonymous with nobody signed in, paid for a user with at least one live grant, registered otherwise. |
user.membership_level |
string | The slug of the highest-ranked product among the user’s live grants. Empty with none. |
user.membership_type |
string | How that same grant was sold, as its offer declares. _comped when the grant names no offer. |
device.token |
string | The device cookie EdgeKit Analytics sets on your domain. Empty when the request carries none. |
user_site.source |
string | How the user arrived on this site: signup, import, api, invitation or newsletter. |
user_site.status |
string | The user’s standing on this site: active or blocked. |
grants.site_ids |
list of strings | The sites the user’s live grants reach. |
grants.product_ids |
list of strings | The products of the user’s live grants. |
grants.expires_in_days |
number | Whole days left on the user’s longest live grant. 36500 for a grant with no end, 0 with none. |
paid means a live grant, not a payment: a comped, gifted or group grant counts the same as a purchase.
When the user is not attached to the site, or nobody is signed in, user_site.source is organic and
user_site.status is active.
The request
Section titled “The request”| Fact | Type | Value |
|---|---|---|
request.geo |
string | The country of the connection that reached EdgeKit. Behind your own server or proxy, that is its country. |
request.new_device |
boolean | true when the request carries no device cookie. |
request.preview |
boolean | true only on a request that carries a valid preview token. |
request.hour |
number | The hour of the request, 0 to 23, in your organization’s meter time zone. |
request.date |
string | The day of the request as yyyy-MM-dd, in the same time zone. |
The meter time zone is set on the site screen. See Meter time zone.
Gift links
Section titled “Gift links”gift_link.present, gift_link.valid, gift_link.id, gift_link.source and gift_link.covers_content describe
the gift link the request carries. An invalid, forged or expired gift link reads as no gift link, never an error. See
EdgeKit Paywall.
Newsletter links
Section titled “Newsletter links”newsletter_link.user_id and newsletter_link.list_id name the user and the list of the newsletter link the
request carries: the ek_nl value an edition’s link was sent with. They say who the link was sent to, not who is
clicking, because a forwarded email carries the same link. So user.* and grants.* stay anonymous on such a
request, and only a rule that reads newsletter_link.* treats it differently. Both are empty when the request
carries no newsletter link, when the user is signed in, or when the link does not verify. That is never an error.
newsletter_link.user_state and newsletter_link.membership_level hold what user.state and
user.membership_level would hold if that user were signed in, read from the same grants. Without a newsletter
link they read anonymous and an empty string. Use them to tell a paying user from a stranger on a click from an edition;
a rule that opens paid content on them opens it to anyone the email was forwarded to.
All four newsletter_link.* facts are Attested: EdgeKit verified the link, not who is clicking it.
The browser client reads ek_nl from the page URL once, sends it with that page’s decide requests, and removes
it from the address bar, so a copied URL does not carry it. Other parameters and the fragment are left as they
were. The next page a user opens is decided without it.
An experiment whose unit is the user assigns such a request by the newsletter link’s user, so the page shows the arm the edition showed.
Group membership and traits, fetched when asked
Section titled “Group membership and traits, fetched when asked”| Fact | Type | Value |
|---|---|---|
db_user_org.source |
enum | How the user joined their user organization: invitation, domain_auto_join, billing_sync or api. |
db_user_org.joined_hours_ago |
number | Hours since they joined. |
db_user_traits.complete |
boolean | true when the user has a value for every enabled, required trait, or none is required. |
Only a feature with the journey purpose may read db_user_org.*.
db_user_traits.complete is read on requests from your server with an API key and on journey redirects. A browser
decide request does not fetch it, so a rule that reads it there answers an error. It follows your current trait
settings, not the deployed document. See The one exception: traits.
Bot verdict
Section titled “Bot verdict”bot.verified (boolean), bot.category (enum), bot.score (number, 1 to 99) and bot.corporate_proxy (boolean)
describe the request, never the requester, who is a device like any other. They exist only on a site with a bot verdict; reading one anywhere else is
an error. A request with no score reads bot.score as absent, so a test that bot.score is under 30 holds only
for a scored request. bot.corporate_proxy is true for a request that came through a verified corporate proxy,
where a low score can front real users.
Centinel verdict
Section titled “Centinel verdict”centinel.* facts are Centinel Analytica’s verdict on the request, for an organization that gives EdgeKit its
Centinel key: centinel.decision, the block reasons and the identified crawler. EdgeKit asks Centinel only when a
rule reads one. With no key, no trusted address for the request, or no answer within 300 ms, the namespace has no
value and reading it is an error. They are separate from bot.*, and nothing combines the two. See
Centinel.
Content items
Section titled “Content items”item.* facts describe one content item: its source id, sections, tags, content type and subtype, authors,
publication time and language. They have a value only when EdgeKit decides about one content item, and are an error
everywhere else. Today that is your MCP server’s mcp_content feature; see
Decide what each user gets.
How the request arrived
Section titled “How the request arrived”EdgeKit reads these facts from the request’s headers and one cookie. The browser or your own server or proxy sets each, so their trust tier is Unverified. A missing header or cookie is a value a rule can test, never an error.
| Fact | Type | Value |
|---|---|---|
request.referrer_class |
enum | Where the request came from, read from its referer header the way EdgeKit Analytics classifies a referrer: search, social, email, paid, chatbot, internal (the page’s own domain) or unknown. direct when there is no referrer. |
request.device_class |
enum | mobile when the user agent names a mobile browser, desktop otherwise. |
request.utm_medium |
string | The page’s utm_medium parameter, read from the x-edgekit-utm header. Empty when absent. |
request.utm_source |
string | The same, for utm_source. |
request.utm_campaign |
string | The same, for utm_campaign. |
request.utm_term |
string | The same, for utm_term. |
request.utm_content |
string | The same, for utm_content. |
request.geo_region |
string | The region code of the user’s connection, read from the cf-region-code header. Empty when absent. |
request.ad_blocker |
enum | true when the device blocks ads, false when it does not, read from the _ek_ab cookie. unknown when the cookie is absent or holds anything else. |
The site proxy’s page script writes _ek_ab on each page view, 1 or 0. A
device that never ran the script reads unknown, not false.
x-edgekit-utm holds the page URL’s five utm_ parameters, form-encoded, such as
utm_medium=email&utm_source=daily. A request from your server with an API key may send it and cf-region-code.
A decide request the browser client sends describes the page that sent it, not how the user reached that page:
request.referrer_class reads internal and the utm_* facts read empty. These facts describe the user’s arrival
only when your server or proxy forwards the page view’s own referrer and parameters.
Anyone can set these headers and the cookie. A rule that opens your content on one of them is a way around your own access rules; use them to choose between outcomes that do not open content.
The Facts screen
Section titled “The Facts screen”Revenue › Decision Engine › Facts has one row per fact:
- Fact: the path, and what it means.
- Type:
string,number,boolean,date,string[]orenum. - Source: the trust tier: EdgeKit, Signed, Attested or Unverified.
- When: always loaded or only when asked.
- Values: the legal values of an
enum, or any value of the type. - Read by: the features that name the fact, or no feature asks.
The list follows the draft, so a fact you declare appears here before you deploy it.