@autheos/embedcode
v2.0.0
Published
Autheos embed code
Downloads
13
Readme
Increase your e-commerce sales by adding more product video content to your shop.
Use the Autheos embed code just once to automatically retrieve product videos from our database and instantly display them on all the correct product pages in your shop.
Installing
Install the Autheos embed code by adding it to your website:
<script src="//cdn.autheos.com/code/[email protected]"></script>
Then include the following snippet to show video on your site:
<button id="your-add-to-cart-selector">Add to cart</button>
<div id="video"></button>
<script>
Autheos.getVideos({
ean: ['1234567890123'],
language: ['nl', 'en'],
}).then(function (ctx) {
ctx.videos.forEach(function(video) {
var player = Autheos.createPlayer(ctx, video.id);
Autheos.attachAddToCartTracker(ctx, '#your-add-to-cart-selector');
Autheos.embedPlayer(ctx, player, '#video');
});
});
</script>