Tealium provides an HTTP API endpoint for collecting event data from any location. This means that you can collect data from events that happen in your app or, in the case of Alexa, events that happen in a cloud provider. This example shows an AWS Lambda function used for an Alexa skill that tracks usage of that Alexa skill. Alexa developer tools allow you to create the Lambda function without the traditional AWS setup and permissions.
Alexa Skill Using AWS Lambda
The following is the AWS Lambda code to send data to Tealium's HTTP API endpoint. This code runs inside an Alexa skill to POST a data layer in JSON to Tealium Collect.
This same event tracking code can be placed inside a function such as GetNewFactHandler.
Watch this short video demonstration of how to add Tealium Collect to an Alexa skill:
The Power of Server-to-Server
From there, you can send data server-to-server from Tealium EventStream to one or multiple vendors (such as an Analytics vendor). This means you only need one implementation code snippet for data collection in your AWS Lambda -- as opposed to one snippet of code for each every vendor you have. A single tracking implementation for all events opens up a world of server-side integrations and a lighter-weight AWS Lambda function.