Attributes

Documents / Data Vista

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

WordEveryday meaningMeaning in CROForge
AttributeA 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 VistaA view of a collection of data.The library that holds Attributes, Segments, and Metrics. Attributes live here.
apiNameA 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 typeWhat 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 CustomShipped 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).
UTMMarketing 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.
visitorTypeWhether someone is here for the first time or has been here before.Values NEW and RETURNING. Used by the New Visitors standard segment.
deviceTypeWhat kind of gadget the person is using.Values desktop, mobile, and tablet as produced by Smart Code. Segment expected values must match that casing.
OSOperating system — Windows, macOS, iOS, Android, and so on.Attribute os (Text), filled by Smart Code.
browserThe app used to open the website (Chrome, Safari, Firefox).Attributes browser and browserVersion.
referralThe previous page or site that sent the visitor here.Attribute referralUrl — the referring URL captured for the session.
PAGE_URLThe address of the page currently on screen.A URL-typed attribute used with URL include/exclude rule packs in segment (and sometimes metric) conditions.
SegmentA 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.

TypeEnumEveryday ideaTypical examples in CROForge
Text0Words or codesbrowser, OS, UTM source, deviceType, visitorType
Number1A quantity you can compare with greater/less/betweenamounts, numeric versions
Boolean2Yes or notouch support
URL3A web address, matched with include/exclude rulesPAGE_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:

FieldWhat it means
NameDisplay name in the UI (up to 40 characters; letters, numbers, spaces, and a small set of symbols).
API nameStable identifier used in code. Letters, numbers, and underscore only. Max 40 characters. Treat this as permanent once segments exist.
Data typeText, Number, Boolean, or URL.
DescriptionHuman documentation so marketers know what the value represents.
ValuesOptional 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.

apiNameEveryday meaningTypical values / notes
osOperating systemText, for example Windows or iOS
browserWeb browser nameText
browserVersionBrowser versionText or numeric depending on how it is stored
touchSupportWhether the device reports touchBoolean
languageBrowser / UI languageText
timezoneVisitor time zoneText
networkTypeConnection class when the browser exposes itText
deviceTypeForm factordesktop / mobile / tablet
visitorTypeFirst-time vs seen beforeNEW / RETURNING
utmSourceUTM source tagFor example google, linkedin
utmMediumUTM medium tagFor example cpc, email
utmCampaignUTM campaign tagYour campaign name
utmTermUTM term tagOften paid-search keywords
referralUrlReferring pageURL string
PAGE_URLCurrent page addressURL 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.


Related reading