Visitor object

This article provides information on the visitor object for visitor functions.

Visitor object for visitor functions

The visitor object contains the following properties:

Property Data Type Description
visitor.metrics Record<string, number> Visitor metrics.
visitor.metrics_sets Tally<string, number>
visitor.dates Record<string, number> Visitor dates.
visitor.audiences_joined_at Record<string, number> Timestamp when the visitor joined audiences.
visitor.properties Record<string, any> Visitor properties.
visitor.properties.account string Tealium Account.
visitor.properties.profile string Tealium Profile.
visitor.properties.visitor_id string Tealium Visitor ID.
visitor.property_sets Set<string, any>
visitor.audiences string[] List of joined audiences.
visitor.badges string[] List of badges.
visitor.creation_ts number Visitor creation timestamp.
visitor.flags Map<string, Boolean>
visitor.current_visit Record<string, any> Current visit object.
visitor.current_visit.metrics Record<string, number> Current visit metrics.
visitor.current_visit.metrics_sets Tally<string, number>
visitor.current_visit.dates Record<string, number> Current visit dates.
visitor.current_visit.properties Record<string, any> Current visit properties.
visitor.current_visit.flags Map<string, Boolean> Current visit flags.
visitor.current_visit.property_sets Set<string, any> Current visit property sets.
visitor.current_visit.creation_ts number Current visit creation timestamp.
visitor.current_visit.total_event_count number Current visit total event count.
visitor.current_visit.events_compressed boolean Current visit events compressed.

Visitor object example

The following is an example of visitor object data:

{
  "metrics": {
    "Metric 1": 1,
    "Metric 2": 2
  },
  "dates": {
    "Date 1": 1603373790000,
    "Date 2": 1603373522000,
  },
  "properties": {
    "profile": "username",
    "visitor_id": "017560818b67001bc185a07f1cd703078003405000b7e",
    "account": "user-account",
  },
  "audiences": [
    "Audience 1",
    "Audience 2"
  ],
  "badges": [
    "Badge 1",
    "Badge 2"
  ],
  "creation_ts": 1603373522000,
  "current_visit": {
    "metrics": {
      "Metric 1": 1.3,
      "Metric 2": 6,
    },
    "dates": {
      "Date 1": 1603373868000,
      "Date 2": 1603373790000,
    },
    "properties": {
      "Property 1": "Chrome",
      "Property 2": "https://URL-for-website ",
    },
    "flags": {
      "Flag 1": true,
      "Flag 2": false
    },
    "property_sets": {
      "Property Set 1": [
        "Mac desktop"
      ],
      "Property Set 2": [
        "Chrome"
      ]
    },
    "creation_ts": 1603373790000,
    "total_event_count": 2,
    "events_compressed": false
  },
  "audiences_joined_at": {
    "Audience 1": 1603363523014,
    "Audience 2": 1603363523014
  }
}

Was this page helpful?

This page was last updated: January 7, 2023