In this document, you will learn how to use a third-party reporting system.
\uD83D\uDCD8 Instructions
The 3rd party reporting system could be used by giving the essential inputs to the 3rd party system.
Prerequisite:
To utilize the 3rd party reporting system, the following details of the reporting system are required.
Url
Key
Message structure (JSON)
With the above details, the required data are sent to the 3rd party in JSON format in a payload.
The below example is input to Dashbot reporting:
var apiKeyAlexa = msg.apiKeyAlexa;
var apiKeyGeneric = msg.apiKeyGeneric;
var analytics = msg.analytics;
if (analytics.dialog.surface == 'Alexa') {
var dashbot = {
"event": {
"version": "1.0",
"session": {
"new": analytics.dialog.sessionNew,
"sessionId": analytics.sessionId,
"application": {
"applicationId": analytics.applicationId
},
"attributes": {},
"user": {
"userId": analytics.user.userId
}
},
"request": {
"type": analytics.dialog.type,
"requestId": analytics.requestId,
"timestamp": analytics.timeStampStart,
"intent": {
"name": analytics.intent,
"slots": analytics.slots
}
}
}
};
msg.dashbot = dashbot;
msg.url = 'https://tracker.dashbot.io/track?platform=alexa&v=9.4.0-rest&type=incoming&apiKey=' + apiKeyAlexa;
msg.payload = dashbot;
return msg;
} else {
analytics.user.currentUserId = null; // we don't want to store that in analytics
var dashbot = {
"text": analytics.dialog.utterance,
"userId": analytics.user.userId,
"platformJson": analytics
};
msg.dashbot = dashbot;
msg.url = 'https://tracker.dashbot.io/track?platform=generic&v=9.4.0-rest&type=incoming&apiKey=' + apiKeyGeneric;
msg.payload = dashbot;
return msg;
}
Highlight important information in a panel like this one. To edit this panel's color or style, select one of the options in the menu.