Instreamatic
Search…
Custom Skill Audio Ads
Audio Ads for Custom Alexa Skills
This document explains the process of integration Custom Alexa Skill with Instreamatic.AI Voice-Activated ads network. Please use this manual if your Alexa Skill is developed with node.js and alexa-app npm module.

Install Instreamatic.AI Alexa SDK

In order to use our SDK in your Alexa skill, please execute the following command in a folder containing npm modules for your skill:
1
bash$ npm install instreamatic-alexa-sdk
Copied!
There should be node_modules/ directory to properly execute this command.

Example of integration with Instreamatic Ad Network

1
var manager = new Adman.Manager(app, { <br>redis: {“port”: 6667, “db”: 0},
2
publisherId: 777,
3
skillId: 777,
4
preview: 44
5
});
6
ad_manager.adEvent('AdComplete', function(req, res) {
7
... Here you can place the code you want ...
8
... to run when commercial is over ...
9
});
10
manager.adEvent('AdNone', function(req, res) {
11
... Here you can place the code you want ...
12
... to run when there are no ads to play ...
13
});
14
app.intent("SomeYourIntent", function(req, res) {
15
if (you_want_to_start_commercial) {
16
return ad_manager.start(req, res);
17
// ad_manager.start returns Promise
18
}
19
});
Copied!
where:
  • publisherId <Integer> *required - our manager or support team member will provide you with this value.
  • skillId <Integer> *optional - If you operate several Skills you can use that ID to track impressions separately. Please contact our team member to receive IDs.
  • preview <Integer> *optional - use it for debugging

How to check if everything is working

  • Modify your skill accordingly.
  • Use partnerId=1017 and preview=44, do not use any skillId flag for testing.
  • Start your skill and say what you need to activate intent with the ad.
Last modified 2yr ago