Global

Members

(constant) EMPLOYEE_SIZE_LOOKUP

Employee count-specific customization values
Source:
Example
window.lr_analytics.EMPLOYEE_SIZE_LOOKUP['50 - 100']

(constant) INDUSTRY_LOOKUP

Industry-specific customization values
Source:
Example
window.lr_analytics.INDUSTRY_LOOKUP['Test Industry']

(constant) sixSenseCallbacks

Functions to be used with the 6sense company API response
Source:

Methods

identify(userID, traits)

Send an identify event to segment & LogRocket
Parameters:
Name Type Description
userID string A unique identifier for this user
traits object A dictionary of traits you know about the user
Source:

init(options)

Initializes analytics tools and trackers. The options object given to this function is a a blueprint for what trackers to enable.
Parameters:
Name Type Description
options Object Options object specifying what analytics/trackers to set up.
Properties
Name Type Attributes Description
analyticsProxy Object <optional>
Options for setting up the analytics proxy.
Properties
Name Type Attributes Description
enabled boolean | function Enable the analytics proxy
hostnames Array.<string> <optional>
Additional hostnames to proxy
wordsToMask Array.<string> <optional>
Additional words to mask
segment Object <optional>
Options for seting up segment snippet
Properties
Name Type Attributes Description
enabled boolean | function Enable segment
writeKey string <optional>
The segment api key
load boolean <optional>
Makes the `window.analytics.load()` after executing the snippet. Defaults to false.
sixSense Object <optional>
- Options for setting up 6sense & 6signal snippet
Properties
Name Type Attributes Description
enabled boolean | function Enable 6sense
apiKey string 6sense api key
qa boolean <optional>
Send data to the QA/test endpoint instead of production
companyDetails Object <optional>
Options relating to the 6sense company details API
Properties
Name Type Description
enabled boolean | function Enable the 6sense company details API
apiKey string The company details API api key
callback SixSenseCompanyApiCallback function to run after we receive a response from the 6sense company details API
vwo Object <optional>
Options for setting up the vwo snippet
Properties
Name Type Description
enabled boolean | function Enable vwo
accountId number VWO account ID
redditPixel Object <optional>
Options for setting up the reddit pixel snippet
Properties
Name Type Description
enabled boolean | function Enable the redit pixel
accountId string Reddit adds advertiser id prefixed by
clearbitReveal Object <optional>
Options for setting up Clearbit reveal
Properties
Name Type Description
enabled boolean | function Enable clearbit reveal
apiKey string Public api key for clearbit reveal. starts with pk_
callback function Function to be called with result of clearbit reveal
utmMediumHash Object <optional>
Options for utm_medium URL hash
Properties
Name Type Description
enabled boolean | function Enable putting the utm_medium query param in the hash
logrocket Object <optional>
Options for setting up the logrocket snippet
Properties
Name Type Description
enabled boolean | function Enable LogRocket
callInit boolean Makes the `LogRocket.init()` call once the script has been loaded.
appSlug string LogRocket appslug. Will be passed to `LogRocket.init()` if it is called
initOptions Object Options to pass as-is to `LogRocket.Init()`
mntn Object <optional>
Options for setting up the MNTN snippet
Properties
Name Type Description
enabled boolean | function Enable MNTN
Source:
Example
window.lr_analytics.init({
  analyticsProxy : { enabled: true },
  segment: {
    enabled: true,
    writeKey: 'abc',
    load: true,
  },
  sixSense: {
    enabled: true,
    apiKey: 'xyz',
  }
});

mntnConversion()

Record a conversion on the MNTN platform
Source:

sendSegmentEvents(sixSenseResponse)

Add 6sense information as window properties, then send them to our analytics destinations This function can be used wherever a SixSenseCompanyApiCallback is required
Parameters:
Name Type Description
sixSenseResponse string The 6sense company API response
Source:
Examples
window.lr_analytics.init({
  sixSense: {
    enabled: true,
    apiKey: 'xyz',
    companyDetails: {
      enabled: true,
      apiKey: 'xyz',
      callback: window.lr_analytics.sixSenseCallbacks.sendSegmentEvents
    }
  }
 });
window.lr_analytics.init({
  sixSense: {
    enabled: true,
    apiKey: 'xyz',
    companyDetails: {
      enabled: true,
      apiKey: 'xyz',
      callback: (response) => {
        window.lr_analytics.sixSenseCallbacks.sendSegmentEvents(response);
        // do something else with the response
      }
    }
  }
});

track(event, propertiesopt)

Send a track event to segment & LogRocket
Parameters:
Name Type Attributes Description
event string The name of the event
properties object <optional>
Additional properties
Source:

Type Definitions

SixSenseCompanyApiCallback(sixSenseResponse)

The expected shape of a function that accepts the result of the 6sense company details API call.
Parameters:
Name Type Description
sixSenseResponse string The result of the 6sense company API call. Can be parsed using `JSON.parse`
Source: