The MoEngage Web SDK can track user data and events to enhance analytics and display onsite messages in LG TVs (webOS) and Samsung Tizen OS TV.
For a complete technical reference, check out our Javascript Documentation or our sample apps for LG TV and Samsung TV to see the Web SDK running on a TV.
library_add_check |
Prerequisites
|
Supported Features
Integration
Since the TV apps does not have URL and the SDK requires to do a lot of stuff on changing page/screen, it needs to be notified that the page/screen has changed. So you have to call the helper function Moengage.handle_page_change()
on changing the screen
TV Remote Navigation in On-site Messaging (OSM)
We only support horizontal navigation in the template as of now. In the OSM campaign creation, when you select TV as the platform in Step-1, you will only be able to use the limited templates available. In those templates, only horizontal navigation can be used.
Deeplinks in OSM Templates
Since the hyper link redirection cannot happen by default in TV as in browsers, there is a event being emitted from the template on clicking on any link and you can listen to that events and handle the redirection.
<script type="text/javascript">
window.addEventListener('MOE_AUTOMATED_EVENTS', function (event) {
if(event.detail) {
if(event.detail.name === 'MOE_ONSITE_CLICKED') {
console.log(event.detail.data);
// {
// deeplink: 'https://google.com',
// label: 'Click Me',
// campaignName: 'Test Campaign'
// }
}
if(event.detail.name === 'MOE_ONSITE_DISMISSED') {
console.log(event.detail.data);
// {
// label: 'Click Me',
// campaignName: 'Test Campaign'
// }
}
}
});
</script>
Sample Code
We have created the following sample apps for reference.
info |
Note The Web SDK supports the following TV OS versions:
|