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
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
|
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
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 |
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` |