getVisitorInfo
The getVisitorInfo() method returns information about the visitor.
Syntax
getVisitorInfo()
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
Returns
Information about the visitor.
Format: The following visitor information:
- New visitor:1 Returning visitor: 0
- Visitor ID: 16-character hex number
- First visit timestamp: UNIX epoch time
- Previous visit count: "0" for the first visit
- Current visit timestamp: UNIX epoch time
- Last visit timestamp: UNIX epoch time or "" if N/A
- Last ecommerce order timestamp: UNIX epoch time or "" if N/A
Type: string[]
Examples
To return visitor information:
_paq.push([function () {
console.log(this.getVisitorInfo());
}]);
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
getVisitorInfo(): Promise<VisitorInfo>
A sample of the return value:
[
"0",
"6d85cb0b727eca52",
"1624261490",
"12",
"1631115486",
"1631115483",
"1630590788"
]
Related methods
Updated 6 days ago