Attributes
An attribute is a characteristic — a fact about someone or something. In CROForge, an attribute is a typed property of a visitor or session (browser, device, UTM campaign, page URL, or a custom trait you define). Segments use attributes as the fields they compare. Smart Code fills standard attributes automatically; you create custom ones when you need a fact the product does not already collect.
Words used on this page
| Word | Everyday meaning | Meaning in CROForge |
|---|---|---|
| Attribute | A characteristic (color of a car, language a person speaks). | A named, typed fact used in segment conditions (and visible as a library item under Data Vista → Attributes). |
| Data Vista | A view of a collection of data. | The library that holds Attributes, Segments, and Metrics. Attributes live here. |
| apiName | A stable machine name, like a handle that code uses even if the label on the box changes. | The identifier used in code and conditions. For custom attributes it may contain only letters, numbers, and underscore (_). Do not rename it after segments already depend on it. |
| Data type | What kind of value something is: words, numbers, yes/no, or a web address. | PROPERTY_DATA_TYPE: Text (0), Number (1), Boolean (2), URL (3). The type decides which match operators you get. |
| Standard vs Custom | Shipped with the product vs made by your team. | Standard attributes are system-defined and resolved by Smart Code helpers. Custom attributes are workspace-owned (name, API name, data type, description, optional values). |
| UTM | Marketing tracking tags appended to links so you can see where traffic came from. | Attributes utmSource, utmMedium, utmCampaign, and utmTerm (source, medium, campaign, term). Smart Code reads them from the landing URL and typically persists them for the visit. |
| visitorType | Whether someone is here for the first time or has been here before. | Values NEW and RETURNING. Used by the New Visitors standard segment. |
| deviceType | What kind of gadget the person is using. | Values desktop, mobile, and tablet as produced by Smart Code. Segment expected values must match that casing. |
| OS | Operating system — Windows, macOS, iOS, Android, and so on. | Attribute os (Text), filled by Smart Code. |
| browser | The app used to open the website (Chrome, Safari, Firefox). | Attributes browser and browserVersion. |
| referral | The previous page or site that sent the visitor here. | Attribute referralUrl — the referring URL captured for the session. |
| PAGE_URL | The address of the page currently on screen. | A URL-typed attribute used with URL include/exclude rule packs in segment (and sometimes metric) conditions. |
| Segment | A slice of visitors. | A named list of conditions on attributes. That is the main consumer of attributes. |
Screenshot filename: attributes-list.png. Paste this page into the WordPress Code editor, then insert that screenshot from the Media library. Do not use a Markdown image tag.
What an attribute is for
Think of attributes as columns on a visitor profile: operating system, browser, whether they are new, which UTM campaign they arrived on, which page they are on. A segment is a filter over those columns. Without attributes, you could only run tests on “everyone.”
Attributes are not the same as event properties. An attribute describes the visitor or session. An event property describes one happening (click text, purchase amount). Segments read attributes. Metrics read event properties.
Data types (PROPERTY_DATA_TYPE)
Every attribute has one data type. That type is stored as a number in the product enum and shown in the UI as a label.
| Type | Enum | Everyday idea | Typical examples in CROForge |
|---|---|---|---|
| Text | 0 | Words or codes | browser, OS, UTM source, deviceType, visitorType |
| Number | 1 | A quantity you can compare with greater/less/between | amounts, numeric versions |
| Boolean | 2 | Yes or no | touch support |
| URL | 3 | A web address, matched with include/exclude rules | PAGE_URL rule packs |
Match operators follow the type: text gets exact / contains / starts with / regex; number gets equal / between; boolean gets is true / is false; URL gets a pack of include and exclude URL rules.
Custom attribute fields
When you create a custom attribute, the modal asks for:
| Field | What it means |
|---|---|
| Name | Display name in the UI (up to 40 characters; letters, numbers, spaces, and a small set of symbols). |
| API name | Stable identifier used in code. Letters, numbers, and underscore only. Max 40 characters. Treat this as permanent once segments exist. |
| Data type | Text, Number, Boolean, or URL. |
| Description | Human documentation so marketers know what the value represents. |
| Values | Optional allowed-value list. Use it when the attribute should only ever be one of a known set (for example plan names). |
The display Name can be friendly (“Visitor type”). The API name is what matching and code rely on (
visitorType). Changing the label is safer than changing the API name.
Standard attributes (typical)
Smart Code helpers resolve these for every visitor. Exact availability follows the Smart Code catalog; these are the typical names you will see in Data Vista and in segment builders.
| apiName | Everyday meaning | Typical values / notes |
|---|---|---|
os | Operating system | Text, for example Windows or iOS |
browser | Web browser name | Text |
browserVersion | Browser version | Text or numeric depending on how it is stored |
touchSupport | Whether the device reports touch | Boolean |
language | Browser / UI language | Text |
timezone | Visitor time zone | Text |
networkType | Connection class when the browser exposes it | Text |
deviceType | Form factor | desktop / mobile / tablet |
visitorType | First-time vs seen before | NEW / RETURNING |
utmSource | UTM source tag | For example google, linkedin |
utmMedium | UTM medium tag | For example cpc, email |
utmCampaign | UTM campaign tag | Your campaign name |
utmTerm | UTM term tag | Often paid-search keywords |
referralUrl | Referring page | URL string |
PAGE_URL | Current page address | URL type — use include/exclude rule packs |
Runtime resolution is documented in Smart Code runtime. UTM values are typically persisted so later pages in the same visit still know how the visitor arrived.
How the Attributes screen works
Left sidebar list grouped into Standard and Custom, plus a right details panel for the selected attribute. Create and edit open a modal. Delete asks for confirmation.
Standard items have workspaceId null (shared). Custom items belong to the current workspace. You usually do not edit the definition of a standard attribute; you use it in segments.
Casing and allowed values
Segment matching is case-sensitive for exact text matches. Smart Code may emit desktop while a segment condition expects DESKTOP. Those two strings are not the same. Align the values you type in a segment with the values Smart Code actually produces. Prefer the optional Values list on custom attributes so marketers pick from known strings instead of inventing new spellings.