Page tree



The Evergage JavaScript beacon places a first party cookie on the visitor's browser which sends data for that visitor back to Evergage. This includes pages visited, links clicked, time on site, number of visits, geolocation, and referral source, as well as other custom data you want collected. 

This article will review the types of beacons available and how to select the right one for your site, how to determine if you need to make any configuration changes to track additional information, and how to integrate the beacon into your site.


Beacon Installation Checklist

  • Use Evergage beacon version 4 or later (adjust it in SETTINGS > Beacon Version)
  • Point the integration to the right protocol (https or http). You can also omit the protocol and include //
  • Insert the synchronous integration script
  • Insert any other _aaq.push() calls needed before the script
  • Review the differences in page load events

Integration Types

There are two types of integrations that can be done with the Evergage beacon:

  • Synchronous–recommended for most customers, this integration loads the beacon before the page loads so Evergage can prevent page flicker, a momentary flash of the original page content
  • Asynchronous–this integration loads the beacon after the page has loaded. With this integration, Evergage cannot protect against flicker

For more specific details, please refer to the article on Synchronous vs. Asynchronous Integration.

Once you place the JavaScript beacon code on your site, it will start collecting data. Prior to doing so, you may want to modify the integration code so you can pass user fields (e.g. user ID, user first name, user email) to Evergage. For more specific details, please refer to the article on the JavaScript Beacon Library of Functions.


Integrating the Beacon

To access the JavaScript integration code, you must be an Evergage administrator at your company.

  1. Log into Evergage as an administrator
  2. Select SETTINGS
  3. In the Integration section, select JavaScript
  4. If you have more than one dataset, select the one you want from the dropdown at the top left of the screen before copying the beacon code
  5. Copy the code as directed on the screen and place it into the header of your site to ensure that the beacon is loaded on every page of the site. It will be similar to

    SAMPLE JavaScript Beacon Code


Above is an example of an Evergage JavaScript beacon. Your tracking beacon is unique to your Evergage account and dataset, so please be sure to use the correct JavaScript code found under each dataset in your Evergage account.

Tracking Additional User Information

Depending on what additional information you would like to collect, you may need to adjust the beacon code before you place it in your site. Typically, there are three additional pieces of information you may want to gather about logged in site or product visitors.

1. UserID

If the userID is visible after a user logs into your product or site and login is required on a regular basis, you do not need to modify the beacon code because we can track the userID on the login page. Be aware that userID must be a unique identifier (i.e. email address) and first initial last name is not recommended because multiple users could have the same first initial and last name. Otherwise, please refer to the JavaScript Beacon Library of Functions.

2. Company/Account

If the account of the logged in user is visible in your site or product or if you include the account name in the subdomain of your URL when logged in (i.e. then you do not need to modify the beacon code for Evergage to determine the account associate with the logged in user. Otherwise, please refer to the JavaScript Beacon Library of Functions.

3. Account Type/Subscription Level

If you store account type or lifecycle state of your customers in your Salesforce or SugarCRM then you can use these services to pass the data to Evergage.  If you want to capture this information, but are not using Salesforce or SugarCRM, an engineer will need to add the account the user is logged into to the tracking code as outlined in the JavaScript Beacon Library of Functions.


You will need to include two script tags if you adjust the beacon code to capture other variables, like UserID.  In the first script tag, define these variables and in the second, define the beacon, in that order as user info must be loaded before the beacon. For example, if you are defining the UserID in a variable called mySitesUsername, it would look something like this:

This page has no comments.