JavaScript Settings

Our JavaScript Library tracks several events for you automatically.

Events Automatically Tracked

If you are using the JavaScript library, we automatically track certain events and properties by default:

"Visited Site"

We record Visited Site once for each visitor’s browsing session. After 30 minutes of inactivity, the next time the visitor comes back will trigger a new Visited Site event, and they will also have the KM Returning Property set to "Returning".

A number of other properties also get recorded along with the Visited Site event, including the following:

  • KM Referrer: the URL the visitor came from
  • KM Landing Page: the first page a user visited at the start of session
  • KM Returning: whether the user is new or returning
  • KM Device Type: the device being used by user
  • KM Device Category: the type of device the user is operating
  • KM Screen Resolution: the size of the user's screen
  • KM Operating System: the operating system of the above device
  • KM Operating System Version: the version of the above operating system
  • KM Browser: the browser that being used by user
  • KM Browser Version: the browser and version the user is running
  • KM City: the city where the user is located
  • KM Region: the state or region where the user is located
  • KM Country: the country where the user is located
  • KM Continent: the continent where the user is located

Form Fields

"Ad Campaign Hit" (listed in settings as “Google Ad Traffic”)

Triggered if a visitor reaches your site via a Google Ad Campaign (eg. paid search). We detect this by checking the URL for ?gclid or ?utm_ parameters, which indicate a URL tagged for ad purposes.

All the UTM variables will be captured as Properties if they are present in the URL:

  • Campaign Source: corresponds to utm_source
  • Campaign Medium: corresponds to utm_medium
  • Campaign Terms: corresponds to utm_term
  • Campaign Content: corresponds to utm_content
  • Campaign Name: corresponds to utm_campaign

"Search Engine Hit" (listed in settings as “Search Engine Traffic”)

  • Triggered if a visitor reaches your site via a search engine, through organic search.
  • The Property Search Engine - indicates which search engine was used.
  • The Property Search Terms - indicates the search terms used.

"Page View"

(disabled by default!)

  • Triggered every time a visitor views any page on your site.
  • The Property Viewed URL - indicates the page viewed.
  • The Property Referrer - indicates the page last viewed.

Additional Settings

There are three additional settings that are not tied to specific events:

Include URL Host and Subdomain (Event Library)

  • With this option on, the Event Manager can differentiate URL-based events that come from two or more of your subdomains (for example, and are treated differently). With this option off, we don’t use the domain to determine a URL hit (so the previous two URLs would trigger the same event).

Tagged URLs

  • Enable or disable the use of our URL API.

Respect Do Not Track Header

  • Different web browsers allow a user to request that they do not be tracked. Toggling this ‘on’ honors that request so that their activity will not be tracked by our JavaScript Library.

Toggling Automatic Behavior

If you’d prefer to, you can toggle whether these events should be tracked or not. Please go to the JS settings tab. Also, please keep in mind that the JavaScript settings in Kissmetrics only apply to the JavaScript library hosted by Kissmetrics. They do not apply to other official or unofficial libraries (PHP, Ruby, etc.) unless otherwise noted.