API Documentation: visitor.firstSession

First/Initial Session

While the session property captures information on the current session, firstSession holds information on the session in which the visitor reached the website for the first time.

visitor.firstSession.sessionStart
  • Gets the date and time the visitor initially landed on the website.
  • Data Type: Date
visitor.firstSession.referral.url
  • Gets a dictionary object that represents the URL of the website that initially referred the visitor.
  • For a list of properties of the URL object, please see the documentation of the visitor.session.entryPage variable.
visitor.firstSession.referral.search.engine
  • Gets the name of the search engine that initially referred the visitor.
  • Data Type: String
  • Default Value: '' (if the visitor didn't use a search engine to find the website or the search engine used is unknown)
  • Possible Values: 'Google', 'Bing', 'Yahoo', 'AOL', 'Ask', 'Lycos', 'Baidu', 'Yandex', ''
visitor.firstSession.referral.search.query
  • Gets the full search query that the visitor initially used to arrive at the website.
  • Data Type: String
  • Default Value: '' (if no search query is available)
  • Example Values: 'GeoLocation JavaScript', '"Search Query" EXAMPLE'
visitor.firstSession.referral.search.terms
  • Gets an array of keywords used in the search query that brought the visitor to the website. All keywords are converted to lowercase.
  • Data Type: Array of Strings
  • Default Value: [] (if no search query is available)
  • Example Value: ['search query', 'example'] for the search query '"Search Query" EXAMPLE'