JavaScript Tag (Video)
Summary
Generate the JavaScript code required to display the Video ad format on your website. Configure the display settings, generate the script, and add it to your website.
Before You Begin
- Role: Webmaster
- Required information:
- Approved Site traffic source
- Access to your website's HTML source code
- Estimated time: 3-5 minutes
Important! JavaScript code is available only for Site traffic sources. If your source type is Link, create and approve a Site Source before continuing.
Steps
- After your Site Source has been approved, navigate to Sources - Video and open the source you want to use.
- Open the Code page and click Code to open the JavaScript code configuration settings.
- Configure the following parameters:
Type - Select one of the available video integration modes:
a) VAST Ad Link
b) Video Player (Pre-roll)
c) Slider Ad
d) Video Pre-roll + Slider
- Container ID - ID of the HTML element where the video player will be inserted.
- Position Y - Choose whether the video player appears at the top or bottom of the page.
- Position X - Choose whether the video player appears on the left or right side of the page.
- Size - Select the size of the video player.
- Count video - Maximum number of video ads shown in sequence.
- Max Ad View Count - Maximum number of times the Slider Ad can be displayed.
- Pause Before End - Number of seconds before the end of the video when playback is paused.
- Renew Slider Ad Interval - Time interval (in seconds) before the Slider Ad is refreshed.
- Volume - Default playback volume for the video. - You can also customize the appearance and animations of the video player using the settings below.
- Click Get Code to generate the JavaScript code, then copy and paste it into your website.
Troubleshooting
Issue: The downloaded script does not work.
Solutions: Check whether a VPN, browser extension, or another JavaScript library is preventing the script from loading correctly.