Player Scripts & Implementation Notes
In order to embed products from the Inform Player Suite, three things need to be added to a webpage. For best practice ('plain vanilla' implementation), the three code snippets are:
<script>tag to enable use of the Inform Player Suite
- as many products as desired on your page using configurable
- a short
<script>block of code immediately following each configurable
<div>element on the page to begin the embed process
Script Tag to Enable Use of the Inform Player Suite
<script> tag needed is shown below:
<script> tag must be placed before any configurable
<div> elements on the page and is recommended to be placed it within the page's
Configurable Div Elements
<div> elements are used to specify what type of product (along with its config) should be placed on a page. These elements are recognized by the Inform Player Suite when its
class attribute when set to
"inform-embed" and its config settings are set using
data-* attributes; for example, the
data-type attribute specifies what type of Inform Player Suite product to embed.
The list of config settings that are recognized vary depending on what type of product is being embedded. If you visit the page describing each product type, embed code examples and demos are provided for each business use case.
The attributes that specify the config settings of configurable
<div> elements are all lowercase and concatenate words using hyphens, such as the
For convenience, these attributes are shortened from their long concatenated form into a shorter lower camel case form when describing the config setting itself, such as "siteSection".
A full list of configurable settings are listed below:
Class(es) given to Inform player; should always include the 'inform-embed' class.
Also known as 'Widget ID'; unique Inform value given to control player behavior and tracking.
Type of Player (Single, Slider, etc.).
A unique, 5-digit number given to control placement tracking; partners receive this number upon on-boarding, and should be included on every Inform Player.
Given to uniquely identify the page and site-section on which the player is located.
A unique, 8-digit number identifying the video asset desired in playback; this number is readily available in Inform's Digital Media Exchange.
A unique, 3-, 4-, or 5-digit number given to the playlist desired in playback; playlist ids are readily available in Inform's Digital Media Exchange, and can be created by partners, or taken from Inform's pre-populated playlists.
A setting that determines the location of the player when in 'floating' mode.
Width of the Inform player; can be % or px.
Height of the Inform Player; can be % or px.
Aspect-ratio of the Inform Player; can be either 16:9 (default setting) or 4:3.
Player behavior (start behavior) setting of the Inform Player; often used in conjunction with data-config-id to control player behavior.
Short Block of Code Immediately Following Each Configurable Div Element
<script> block of code that needs to be included immediately following each configurable
<div> element on the page is shown below:
This begins the embed process of the product specified using the configurable
<div> element placed on the page immediately before it.