VisitorProfile

traceHelper~ VisitorProfile

An AudienceStream Visitor Profile, as received from Trace (but with up-to-date 'audiences' added, since Trace fails to include that information).

The 'Audience' logic currently assumes that there will be a single Visitor Profile throughout the Trace, just like AudienceStream seems to assume. That may need to change.

There are 'normal' (attribute ids) and 'pretty' versions of each attribute provided - 'pretty' uses the names from the CDH configuration, which easier to read, but prone to change if a user renames an attribute in the CDH UI.

Example:

{
  "_id": "__tealium-solutions_test-example__5034_000000000000000027339414187603748__",
  "audiences": [
    "tealium-solutions_test-example_101"
  ],
  "audiences_joined_at": {
    "tealium-solutions_test-example_101": "2020-09-09T08:25:47.541Z"
  },
  "audiences_pretty": [
    "Counter at least 40"
  ],
  "badges": [
    "5028"
  ],
  "badges_pretty": [
    "Not Live On Site"
  ],
  "creation_ts": 1599639944000,
  "current_visit": {
    "_id": "70ba98ef427f9e17f7577ad575a99e5550eb0ffdfd7184a1b86c855438fe76b5",
    "creation_ts": 1599639881000,
    "dates": {
      "10": 1599639881000,
      "11": 1599639954000,
      "last_event_ts": 1599639954000
    },
    "dates_pretty": {
      "Visit start": 1599639881000,
      "Visit end": 1599639954000,
      "last_event_ts": 1599639954000
    },
    "events_compressed": false,
    "flags": {
      "14": true
    },
    "flags_pretty": {
      "Direct visit": true
    },
    "last_event": {
      "account": "tealium-solutions",
      "profile": "test-example",
      "selector": "2",
      "env": "prod",
      "data": {
        "udo": {
          "tealium_visitor_id": "017471f7827a00652087931d62f003078005507000fb8",
          "tealium_random": "999999999988877777068370713838157",
          "tealium_account": "tealium-solutions",
          "tealium_profile": "test-example",
          "tealium_event": "update_random_to_ensure_freshness"
        },
        "firstparty_tealium_cookies": {
          "trace_id": "SyEqPpFd"
        }
      },
      "type": "LIVE",
      "enrichmentOnly": false,
      "event_id": "00103a60-423a-4abf-bfb2-d91370c2eec8",
      "visitor_id": "017471f7827a00652087931d62f003078005507000fb8",
      "post_time": 1599639954000,
      "useragent": "axios/0.19.2",
      "client_ip": "91.66.7.193",
      "new_visitor": false,
      "_forwarding_visitor_ids_": [
        "017471f7827a00652087931d62f003078005507000fb8"
      ]
    },
    "metrics": {
      "7": 17,
      "12": 1.2166666666666666,
      "80": 0
    },
    "metrics_pretty": {
      "Event count": 17,
      "Visit duration": 1.2166666666666666,
      "Weeks since first visit temp": 0
    },
    "properties": {
      "5": "https://solutions.tealium.net/hosted/webdriver-testing/standard-integration-test.html",
      "44": "other",
      "45": "other",
      "46": "other",
      "47": "browser",
      "48": "other"
    },
    "properties_pretty": {
      "Entry URL": "https://solutions.tealium.net/hosted/webdriver-testing/standard-integration-test.html",
      "Active browser type": "other",
      "Active operating system": "other",
      "Active device": "other",
      "Active platform": "browser",
      "Active browser version": "other"
    },
    "property_sets": {
      "49": [
        "other",
        "Chrome"
      ],
      "50": [
        "other",
        "Mac OS X"
      ],
      "51": [
        "Mac desktop",
        "other"
      ],
      "52": [
        "browser"
      ],
      "53": [
        "other",
        "Chrome"
      ]
    },
    "property_sets_pretty": {
      "Active browser types": [
        "other",
        "Chrome"
      ],
      "Active operating systems": [
        "other",
        "Mac OS X"
      ],
      "Active devices": [
        "Mac desktop",
        "other"
      ],
      "Active platforms": [
        "browser"
      ],
      "Active browser versions": [
        "other",
        "Chrome"
      ]
    },
    "total_event_count": 17
  },
  "dates": {
    "23": 1599639881000,
    "24": 1599639954000,
    "last_visit_start_ts": 1599639881000,
    "audience_tealium-solutions_test-example_101_count_ts": 1599639947541,
    "audience_tealium-solutions_test-example_102_count_ts": 1599639912840
  },
  "dates_pretty": {
    "First visit": 1599639881000,
    "Last visit": 1599639954000,
    "last_visit_start_ts": 1599639881000,
    "audience_tealium-solutions_test-example_101_count_ts": 1599639947541,
    "audience_tealium-solutions_test-example_102_count_ts": 1599639912840
  },
  "expire_at": "2020-12-08T08:25:44.000Z",
  "flag_lists": {
    "5045": [
      true
    ]
  },
  "flag_lists_pretty": {
    "Direct visit record": [
      true
    ]
  },
  "funnels": {
    "5039": {
      "1": {
        "timestamp": 1599639947158,
        "snapshot": {
          "5030": 43,
          "5032": "000000000000000027339414187603748"
        }
      },
      "completed": true
    }
  },
  "funnels_pretty": {
    "Demo Funnel - Has had Import": {
      "1": {
        "timestamp": 1599639947158,
        "snapshot": {
          "imported_counter": 43,
          "imported_customer_id": "000000000000000027339414187603748"
        }
      },
      "completed": true
    }
  },
  "metric_lists": {
    "5043": [
      43
    ]
  },
  "metric_lists_pretty": {
    "Imported Counter Values": [
      43
    ]
  },
  "metric_sets": {
    "55": {
      "Mac desktop": 1,
      "other": 1
    },
    "57": {
      "other": 1,
      "Chrome": 1
    },
    "59": {
      "other": 1,
      "Mac OS X": 1
    },
    "61": {
      "browser": 1
    },
    "63": {
      "other": 1,
      "Chrome": 1
    }
  },
  "metric_sets_pretty": {
    "Lifetime devices used": {
      "Mac desktop": 1,
      "other": 1
    },
    "Lifetime browser types used": {
      "other": 1,
      "Chrome": 1
    },
    "Lifetime operating systems used": {
      "other": 1,
      "Mac OS X": 1
    },
    "Lifetime platforms used": {
      "browser": 1
    },
    "Lifetime browser versions used": {
      "other": 1,
      "Chrome": 1
    }
  },
  "metrics": {
    "15": 1,
    "21": 1,
    "22": 17,
    "25": 1.2166666666666666,
    "26": 1.2166666666666666,
    "28": 1,
    "29": 1,
    "5010": 42
  },
  "metrics_pretty": {
    "Total direct visits": 1,
    "Lifetime visit count": 1,
    "Lifetime event count": 17,
    "Total time spent on site in minutes": 1.2166666666666666,
    "Average visit duration in minutes": 1.2166666666666666,
    "Weeks since first visit": 1,
    "Average visits per week": 1,
    "Counter - Current Value [num]": 42
  },
  "new_visitor": true,
  "properties": {
    "17": "https://solutions.tealium.net/hosted/webdriver-testing/standard-integration-test.html",
    "54": "Mac desktop",
    "56": "other",
    "58": "other",
    "60": "browser",
    "62": "other",
    "profile": "test-example",
    "visitor_id": "__tealium-solutions_test-example__5034_000000000000000027339414187603748__",
    "account": "tealium-solutions"
  },
  "properties_pretty": {
    "Last event URL": "https://solutions.tealium.net/hosted/webdriver-testing/standard-integration-test.html",
    "Lifetime devices used (favorite)": "Mac desktop",
    "Lifetime browser types used (favorite)": "other",
    "Lifetime operating systems used (favorite)": "other",
    "Lifetime platforms used (favorite)": "browser",
    "Lifetime browser versions used (favorite)": "other",
    "profile": "test-example",
    "visitor_id": "__tealium-solutions_test-example__5034_000000000000000027339414187603748__",
    "account": "tealium-solutions"
  },
  "property_lists": {
    "5041": [
      "Chrome"
    ]
  },
  "property_lists_pretty": {
    "All Active browser types from visit starts": [
      "Chrome"
    ]
  },
  "replaces": [
    "import_spoof_24407919786620468",
    "017471f7827a00652087931d62f003078005507000fb8"
  ],
  "secondary_ids": {
    "5034": "000000000000000027339414187603748"
  },
  "secondary_ids_pretty": {
    "Customer Number": "000000000000000027339414187603748"
  },
  "sequences": {
    "5047": [
      {
        "timestamp": 1599639947158,
        "snapshot": {
          "5030": 43,
          "5032": "000000000000000027339414187603748",
          "5034": "000000000000000027339414187603748"
        }
      }
    ]
  },
  "sequences_pretty": {
    "Import events": [
      {
        "timestamp": 1599639947158,
        "snapshot": {
          "imported_counter": 43,
          "imported_customer_id": "000000000000000027339414187603748",
          "Customer Number": "000000000000000027339414187603748"
        }
      }
    ]
  }
}