How to embed Viously script on your website ?

Introduction

This documentation is intended for technical users looking to seamlessly integrate the Viously script into their website. It provides a comprehensive understanding of the script's functionality and a step-by-step installation procedure.

Access to the code generating your HTML pages is required for successful integration.

Purpose of the Viously script

The Viously script serves multiple essential purposes:

  • Player Integration: Allows for the seamless injection of a Viously player into your web pages, either automatically within the Viously platform’s configured location or by integrating the exported player container.
  • Data Layer Initialization: Facilitates the initialization of the data layer, including Brand Safety, Core Web Vitals, consent management, and more, accessible through the Viously platform's analytics dashboard. It ensures compliance with GDPR regulations pertaining to personal data handling.

Recommended integration

Integrating the Viously script is straightforward, just insert the following line into the <head> section of all pages on your website:

<script async id="xieg6Sie" src="https://cdn.viously.com/js/sdk/boot.js"></script>

For websites utilizing a Consent Management Platform (CMP), there's no necessity to condition the Viously tag call via the CMP, as it's directly managed by the Viously script.

Additionally, ensure the script is placed after the loading of the CMP stub for optimal performance.

Note: Third-party integrations such as Google Tag Manager or Kameleoon are not supported. Viously does not provide technical support or handle revenue-related claims within these integrations.

Script Loading Optimization

Understanding script loading optimization is crucial:

The use of the async attribute with the script tag ensures non-blocking loading, allowing the page to render without waiting for the script to download or execute. This significantly enhances load performance by fetching the script in parallel while the page continues to load.

However, the choice between defer and async depends on specific requirements. While async doesn’t guarantee the execution order and is suitable for independent scripts, defer retains the order of execution and might be preferable if the Viously script requires specific sequencing or DOM manipulations before execution.

For any queries or assistance, please reach out to [email protected].