Each Skill needs its own API key for tracking.
Create a Skill to get an API key.
There are two integration points as outlined below.
When Alexa posts to your webhook endpoint, post the same data Alexa sent to you to the following endpoint:
https://tracker.dashbot.io/track?platform=alexa&v=11.1.0-rest&type=incoming&apiKey=<strong>API_KEY_HERE</strong>
Make sure to set the ‘Content-Type’ header to ‘application/json’
{
"event": {
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.abcde1b7-aee0-41e6-8192-f6faaed9f5ef",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.123456-d0ed-0000-ad00-000000d00ebe"
},
"attributes": {},
"user": {
"userId": "amzn1.account.AM12347HF3FAM1B261HK7FFM3A2"
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.123123a-733e-4e89-893a-fdcb77e2ef0d",
"timestamp": "2015-05-13T12:34:56Z",
"intent": {
"name": "airportinfo",
"slots": {
"AIRPORTCODE": {
"value": "JFK",
"name": "AIRPORTCODE"
}
}
}
}
}
}
curl -X POST -H "Content-Type: application/json"
-d '{"event":{"version":"1.0","session":{"new":false,"sessionId":"amzn1.echo-api.session.abcde1b7-aee0-41e6-8192-f6faaed9f5ef","application":{"applicationId":"amzn1.echo-sdk-ams.app.123456-d0ed-0000-ad00-000000d00ebe"},"attributes":{},"user":{"userId":"amzn1.account.AM12347HF3FAM1B261HK7FFM3A2"}},"request":{"type":"IntentRequest","requestId":"amzn1.echo-api.request.123123a-733e-4e89-893a-fdcb77e2ef0d","timestamp":"2015-05-13T12:34:56Z","intent":{"name":"airportinfo","slots":{"AIRPORTCODE":{"value":"JFK","name":"AIRPORTCODE"}}}}}}'
'https://tracker.dashbot.io/track?platform=alexa&v=11.1.0-rest&type=incoming&apiKey=<strong>API_KEY_HERE</strong>'
Note
This is just an example — we accept any rich media that Alexa accepts.
When your bot sends a message, POST to the following endpoint:
https://tracker.dashbot.io/track?platform=alexa&v=11.1.0-rest&type=outgoing&apiKey=<strong>API_KEY_HERE</strong>
Make sure to set the ‘Content-Type’ header to ‘application/json’
{
"event": {
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.abcde1b7-aee0-41e6-8192-f6faaed9f5ef",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.123456-d0ed-0000-ad00-000000d00ebe"
},
"attributes": {},
"user": {
"userId": "amzn1.account.AM12347HF3FAM1B261HK7FFM3A2"
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.6919844a-733e-4e89-893a-fdcb77e2ef0d",
"timestamp": "2015-05-13T12:34:56Z",
"intent": {
"name": "airportinfo",
"slots": {
"AIRPORTCODE": {
"value": "JFK",
"name": "AIRPORTCODE"
}
}
}
}
},
"response": {
"version": "1.0",
"sessionAttributes": {},
"response": {
"shouldEndSession": true,
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>The weather at JFK is 68 and sunny.</speak>"
}
}
}
}
curl -X POST -H "Content-Type: application/json"
-d '{"event":{"version":"1.0","session":{"new":false,"sessionId":"amzn1.echo-api.session.abcde1b7-aee0-41e6-8192-f6faaed9f5ef","application":{"applicationId":"amzn1.echo-sdk-ams.app.123456-d0ed-0000-ad00-000000d00ebe"},"attributes":{},"user":{"userId":"amzn1.account.AM12347HF3FAM1B261HK7FFM3A2"}},"request":{"type":"IntentRequest","requestId":"amzn1.echo-api.request.6919844a-733e-4e89-893a-fdcb77e2ef0d","timestamp":"2015-05-13T12:34:56Z","intent":{"name":"airportinfo","slots":{"AIRPORTCODE":{"value":"JFK","name":"AIRPORTCODE"}}}}},"response":{"version":"1.0","sessionAttributes":{},"response":{"shouldEndSession":true,"outputSpeech":{"type":"SSML","ssml":"The weather at JFK is 68 and sunny."}}}}'
'https://tracker.dashbot.io/track?platform=alexa&v=11.1.0-rest&type=outgoing&apiKey=<strong>API_KEY_HERE</strong>'
Note
This is just an example — we accept any rich media that Alexa accepts.
With Intents, you can roll up similar messages your bot sends to quickly see the combined metrics.
{
"name": "WEATHER_RESPONSE",
"inputs": [
{
"name": "forecast",
"value": "68 and sunny"
}
]
}
{
"event": {
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.abcde1b7-aee0-41e6-8192-f6faaed9f5ef",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.123456-d0ed-0000-ad00-000000d00ebe"
},
"attributes": {},
"user": {
"userId": "amzn1.account.AM12347HF3FAM1B261HK7FFM3A2"
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.6919844a-733e-4e89-893a-fdcb77e2ef0d",
"timestamp": "2015-05-13T12:34:56Z",
"intent": {
"name": "airportinfo",
"slots": {
"AIRPORTCODE": {
"value": "JFK",
"name": "AIRPORTCODE"
}
}
}
}
},
"response": {
<strong>"intent": {
"name": "WEATHER_RESPONSE",
"inputs": [
{
"name": "forecast",
"value": "68 and sunny"
}
]
}</strong>,
"version": "1.0",
"sessionAttributes": {},
"response": {
"shouldEndSession": true,
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>The weather at JFK is 68 and sunny.</speak>"
}
}
}
}
https://tracker.dashbot.io/track?platform=alexa&v=11.1.0-rest&type=outgoing&apiKey=<strong>API_KEY_HERE</strong>
Make sure to set the ‘Content-Type’ header to ‘application/json’
curl -X POST -H "Content-Type: application/json"
-d '{"event":{"version":"1.0","session":{"new":false,"sessionId":"amzn1.echo-api.session.abcde1b7-aee0-41e6-8192-f6faaed9f5ef","application":{"applicationId":"amzn1.echo-sdk-ams.app.123456-d0ed-0000-ad00-000000d00ebe"},"attributes":{},"user":{"userId":"amzn1.account.AM12347HF3FAM1B261HK7FFM3A2"}},"request":{"type":"IntentRequest","requestId":"amzn1.echo-api.request.6919844a-733e-4e89-893a-fdcb77e2ef0d","timestamp":"2015-05-13T12:34:56Z","intent":{"name":"airportinfo","slots":{"AIRPORTCODE":{"value":"JFK","name":"AIRPORTCODE"}}}}},"response":{"intent":{"name":"WEATHER_RESPONSE","inputs":[{"name":"forecast","value":"68 and sunny"}]},"version":"1.0","sessionAttributes":{},"response":{"shouldEndSession":true,"outputSpeech":{"type":"SSML","ssml":"The weather at JFK is 68 and sunny."}}}}'
'https://tracker.dashbot.io/track?platform=alexa&v=11.1.0-rest&type=outgoing&apiKey=<strong>API_KEY_HERE</strong>'
View a complete example.