Cloudflare Docs
Zaraz
Edit this page on GitHub
Set theme to dark (⇧+D)

Properties reference

Cloudflare Zaraz offers properties that you can use when configuring the product. They are helpful to send data to a third-party tool or to create triggers as they have context about a specific user’s browser session and the actions they take on the website. Below is a list of the properties you can access from the Cloudflare dashboard and their values.

​​ Web API

PropertyDescription
Track NameReturns the name of the event sent using the Track method of the Web API. Refer to the Track method for more information.
Track Property name:Returns the value of a zaraz.track() eventProperties key. The key can either be directly used in zaraz.track() or set using zaraz.set(). Set the name of your key here. Refer to the Set method for more information.

​​ Page Properties

PropertyDescription
Page character encodingReturns the document character encoding from document.characterSet.
Page referrerReturns the page referrer from document.referrer.
Page titleReturns the page title.
Query param name:Returns the value of a URL query parameter. When you choose this variable, you need to set the name of your parameter.
URLReturns a string containing the entire URL.
URL base domainReturns the base domain part of the URL, without any subdomains.
URL hostReturns the domain (that is, the hostname) followed by a : and the port of the URL (if a port was specified).
URL hostnameReturns the domain of the URL.
URL originReturns the origin of the URL — that is, its scheme, domain, and port.
URL passwordReturns the password specified before the domain name.
URL pathnameReturns the path of the URL, including the initial /. Does not include the query string or fragment.
URL portReturns the port number of the URL.
URL protocol schemeReturns the protocol scheme of the URL, including the final :.
URL query parametersReturns query parameters provided, beginning with the leading ? character.
URL usernameReturns the username specified before the domain name.

​​ Cookies

PropertyDescription
Cookie name:Returns cookies obtained from the browser document.

​​ Device properties

PropertyDescription
Browser engineReturns the type of browser engine (for example, WebKit).
Browser engine versionReturns the version of the browser’s engine.
Browser nameReturns the browser’s name.
Browser versionReturns the browser’s version.
Device CPUReturns the device’s CPU.
Device IP addressReturns the incoming IP address.
Device languageReturns the language used.
Device screen resolutionReturns the screen resolution of the device.
Device typeReturns the type of device used (for example, iPhone).
Device viewportReturns the visible web page area in user’s device.
Operating system nameReturns the operating system.
Operating system versionReturns the version of the operating system.
User-agent stringReturns the browser’s user agent.

​​ Device location

PropertyDescription
CityReturns the city of the incoming request. For example, Lisbon.
ContinentReturns the continent of the incoming request. For example, EU
Country codeReturns the country code of the incoming request. For example, PT.
EU countryReturns a 1 if the country of the incoming request is in the European Union, and a 0 if it is not.
RegionReturns the ISO 3166-2 name for the first level region associated with the IP address of the incoming request. For example, Lisbon.
Region codeReturns the ISO 3166-2 region code associated with the IP address of the incoming request. For example, 11.
TimezoneReturns the timezone of the incoming request. For example, Europe/Lisbon.

​​ Miscellaneous

PropertyDescription
Random numberReturns a random number unique to each request.
Timestamp (milliseconds)Returns the Unix time in milliseconds.
Timestamp (seconds)Returns the Unix time in seconds.