Skip to Content
DocsReferenceAuto-Properties

Auto-Properties

Auto-properties are $-prefixed key-value pairs that Pug attaches to every event automatically. The SDK adds them on the client before the event leaves the device; the server adds a second layer during ingestion.

The $ prefix is reserved. Custom event properties you send must not start with $ — the API rejects any event whose custom property keys begin with $. See Events API for validation details.

You do not need to set auto-properties yourself. Sending them manually has no effect for server-set properties (they are overwritten) and creates duplicates for SDK-set ones.

SDK-set properties — Web

Set by @pug-sh/browser inside autoProperties on every event, before the batch is sent to the API.

PropertyTypeDescriptionExample
$projectIdstringProject identifierproj_abc123
$platformstringSDK platform — always webweb
$urlstringFull URL of the current page (window.location.href)https://app.example.com/pricing
$referrerstringDocument referrer (document.referrer); empty string when nonehttps://google.com
$pageTitlestringPage title (document.title)Pricing — Acme
$localestringBrowser locale (navigator.language)en-US
$screenWidthstringScreen width in CSS pixels (window.screen.width)1920
$screenHeightstringScreen height in CSS pixels (window.screen.height)1080
$sdkVersionstringWeb SDK version string0.0.1
$browserstringBrowser name, from navigator.userAgentData brands (Chromium)Google Chrome
$browserVersionstringBrowser major version string124
$osstringOperating system / platformmacOS
$osVersionstringOS version (high-entropy, Chromium only)14.4.1
$devicestringDevice model (high-entropy, Chromium only)Pixel 8
$mobilestring"true" or "false" — whether the UA reports a mobile device"false"
$utmSourcestringutm_source query parametergoogle
$utmMediumstringutm_medium query parametercpc
$utmCampaignstringutm_campaign query parameterspring_sale
$utmContentstringutm_content query parameterbanner_a
$utmTermstringutm_term query parameteranalytics+software

UTM parameters are parsed from window.location.search on every event call. $browser, $browserVersion, $os, $osVersion, $device, and $mobile are read from the User-Agent Client Hints API  (navigator.userAgentData) and are only populated in Chromium-based browsers. Firefox and Safari do not expose this API; those browsers get UA properties set by the server-side fallback (see Server-set properties below). $platform has no such fallback — it comes only from the SDK. Other Pug SDKs set the same key with their own value, so you can filter and break down by platform across them; see Casing differences between SDKs for exactly what each one reports.

See Auto-tracking for which events trigger automatically.

SDK-set properties — Flutter

Set by pug_flutter inside autoProperties on every event. All keys are camelCase.

Core

PropertyTypeDescriptionExample
$projectIdstringProject identifierproj_abc123
$sdkVersionstringFlutter SDK version string0.0.2
$platformstringFlutter target platform name (defaultTargetPlatform.name)android, iOS, macOS
$osstringOperating system (Platform.operatingSystem)android
$osVersionstringOS version string14
$localestringDevice locale as a BCP 47 language tagen-US
$timezonestringIANA timezone identifier (from flutter_timezone; falls back to DateTime.now().timeZoneName’s abbreviation)America/New_York
$urlstringCurrent route name — set when a PugRouteObserver is wired/checkout
$referrerstringPrevious route name — set alongside $url on navigation/cart

Screen

PropertyTypeDescriptionExample
$screenWidthintegerLogical screen width in dp390
$screenHeightintegerLogical screen height in dp844
$screenScalenumberDevice pixel ratio3.0

App

PropertyTypeDescriptionExample
$appNamestringApp name from PackageInfoAcme App
$appPackagestringBundle / package identifiercom.example.acme
$appVersionstringApp version string1.4.2
$appBuildstringApp build number42

Device (populated per platform)

PropertyPlatformDescriptionExample
$deviceManufacturerAndroid, iOS, macOS, Linux, WindowsDevice manufacturer or OEMApple, Samsung
$deviceModelAndroid, iOS, macOS, Linux, WindowsDevice model nameiPhone 15 Pro, Pixel 8

The user-assigned device name is deliberately not collected — it’s PII.

Network

PropertyTypeDescriptionExample
$networkTypestringActive connectivity typewifi, mobile, ethernet, vpn, bluetooth, other, none, unknown

Campaign and click-ids

Captured from deep-link URIs when autoCaptureCampaigns is enabled. Persisted until the next campaign URL is opened.

PropertyDescriptionExample
$utmSourceutm_source query parametergoogle
$utmMediumutm_medium query parametercpc
$utmCampaignutm_campaign query parameterspring_sale
$utmTermutm_term query parameteranalytics+software
$utmContentutm_content query parameterbanner_a
$gclidGoogle Click IDCj0KCQjw...
$fbclidMeta (Facebook) Click IDIwAR3x...
$msclkidMicrosoft Advertising Click IDabc123
$ttclidTikTok Click IDCg8IEAA...

See Auto-tracking for the navigation events (screen_view on mobile, page_view on web) emitted when a PugRouteObserver is wired.

SDK-set properties — Node

Set by @pug-sh/node inside autoProperties on every event, before the batch is sent to the API.

PropertyTypeDescriptionExample
$libstringLibrary identifier — always pug-nodepug-node
$sdkVersionstringNode SDK version string0.0.5
$platformstringSDK platform — always serverserver

That is the complete set. The server SDK has no browser, device, or ambient user, so it sets none of the page, screen, locale, or campaign properties the client SDKs collect — pass anything you need as a custom property on track() instead. It also omits $projectId: the private key (prv_…) it authenticates with is already project-scoped, so there is no project ID to supply at init.

Server-set properties are still added during ingestion, but they describe your backend rather than your end user — the request reaches the API from your server, so $ip and every geo property derived from it resolve to your server’s address. Filter on $platform = "server" to keep server events out of geo and browser breakdowns.

Casing differences between SDKs

Every Pug SDK sets $platform, which makes it the one key common to all of them — filter or break down on it to separate traffic by SDK.

SDK$platform valueExample
@pug-sh/browseralways webweb
pug_flutterFlutter target platform name (defaultTargetPlatform.name)android, iOS, macOS
@pug-sh/nodealways serverserver

Beyond that key, the Web SDK and Flutter SDK share several property names with identical casing. The table below calls out any divergence so you can write cross-platform queries correctly. “not set” = the SDK could supply this but doesn’t (a real gap on that platform); “not applicable” = the concept doesn’t exist on that platform. The Node SDK is left out: it sets only the three properties listed in its section above.

ConceptWeb SDK propertyFlutter SDK property
URL / screen name$url (full URL)$url (current route name; set when PugRouteObserver is wired)
Page / screen title$pageTitlenot set
Referrer$referrer$referrer (previous route name)
Platform$platform (always web) + $os (platform string)$platform (Flutter enum name) + $os
OS version$osVersion$osVersion
Browser$browsernot set
Browser version$browserVersionnot set
Device model$device$deviceModel
Mobile flag$mobile (string "true"/"false")not set
Screen width$screenWidth$screenWidth
Screen height$screenHeight$screenHeight
Locale$locale$locale
Timezonenot set client-side$timezone
UTM source$utmSource$utmSource
UTM medium$utmMedium$utmMedium
UTM campaign$utmCampaign$utmCampaign
UTM term$utmTerm$utmTerm
UTM content$utmContent$utmContent
Click-idsnot set$gclid, $fbclid, $msclkid, $ttclid
App infonot applicable$appName, $appPackage, $appVersion, $appBuild
Network typenot set$networkType

Server-set properties

Added by the ingestion server during BatchCreate, after the SDK payload arrives. These properties are never present in the SDK payload — values sent by clients are ignored or actively stripped.

Geo enrichment (Cloudflare)

Geo properties come from Cloudflare CDN headers injected at the edge. They are populated only when the API is fronted by Cloudflare with the “Add visitor location headers” Managed Transform enabled. Behind other proxies or in self-hosted setups without Cloudflare, these properties will be absent.

PropertyDescriptionExample
$ipClient IP address (from CF-Connecting-IP, then True-Client-IP, then X-Forwarded-For)203.0.113.1
$continentContinent codeNA
$countryISO 3166-1 alpha-2 country codeUS
$regionRegion or state nameCalifornia
$cityCity nameSan Francisco
$postalCodePostal / ZIP code94107
$metroCodeMetro code (US DMA)807
$latitudeLatitude (float64)37.7749
$longitudeLongitude (float64)-122.4194
$timezoneIANA timezone name from CloudflareAmerica/Los_Angeles

User-agent enrichment (server-side fallback)

For browsers that do not expose the User-Agent Client Hints API (Firefox, Safari, all iOS browsers), the server parses the User-Agent request header and sets these properties. For Chromium browsers the SDK supplies these values directly and they take precedence.

PropertyDescriptionExample
$browserBrowser family nameFirefox
$browserVersionBrowser version string126.0
$osOperating system nameMac OS X
$osVersionOS version string10.15.7
$deviceDevice familyiPhone
$mobile"true" or "false""false"

Bot signals (Cloudflare)

$bot_score and $verified_bot are server-only properties. Any values sent by the client are stripped before enrichment begins; the server then sets them from Cloudflare’s CF-Bot-Score and CF-Verified-Bot headers.

PropertyTypeDescriptionExample
$bot_scoreintegerCloudflare bot score (0–99; lower = more likely bot)2
$verified_botbooleantrue if Cloudflare identified a known good botfalse

These properties are only populated when Cloudflare is in the request path. In self-hosted deployments without Cloudflare, they will be absent.

Using auto-properties in queries

Reference any auto-property in Insights filters and breakdowns exactly like custom properties, using the exact key string including the $ prefix.

Breakdown by country:

Eventspage_view
Breakdown$country
AggregationUnique users

Filter to Chrome users only:

Eventspurchase
Filter$browser = "Chrome"
AggregationSum (revenue)

UTM campaign performance:

Eventssignup_completed
Breakdown$utmCampaign
AggregationCount
Filter$utmSource = "google"

Exclude bots:

Eventspage_view
Filter$bot_score > 50
AggregationUnique users
  • Events API — event validation rules including the $-prefix restriction on custom properties
  • Auto-tracking — what each SDK captures automatically (Web interactions; Flutter navigation + app lifecycle)
Last updated on