2.0.0 • Published 6 years ago

@autheos/embedcode v2.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

Autheos embed code

Build Status npm package

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/embedcode@2.0.0"></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>

Examples