Decibel Insight
Knowledgebase

Integration Functions

The following functions support integration between Decibel and other analytics tools.

Lead ID

decibelInsight('getLeadId');

Returns Decibel Lead ID for the current session.

Returns

(string) Decibel Lead ID

Example

// Add the Decibel Lead ID to the JavaScript data layer.
dataLayer.leadId = decibelInsight('getLeadId');

Session ID

decibelInsight('getSessionId');

Returns Decibel Session ID for the current session.

Returns

(string) Decibel Session ID

Example

// Add the Decibel Session ID to the JavaScript data layer.
dataLayer.sessionId = decibelInsight('getSessionId');

Collection Status Check

decibelInsight('isCollecting');

Determines if Decibel is successfully collecting data.

Returns

(boolean) Decibel collection status:

Example

// Log a message in the console if Decibel is collecting data. 
if (decibelInsight('isCollecting')) { 
console.log('Decibel is collecting');
});