Video for websites: Creating AD Codes
Step 1. Sign up to join OnClickA Publishers: Sign up →
Step 2. Go to the AD Codes tab: AD Codes →
Step 3. Add new AD Code
Step 4. Copy the snippet
Step 5. Paste the snippet from a clipboard to head / to body of your website
Now, let’s get more details about each of the steps.
Step 1
Sign up to OnClickA Publishers. You can do it here:
Step 2
Go to the AD Codes tab:
Step 3
Click on Add new AD Code:
Create new AD Code:
ℹ️ AD Code name
Provide a name for your ad code. This name will only be viewed within our service to help you differentiate one code from another.
ℹ️ Choose your traffic type
It’s essential to select Category group and Category ID. Choose the category that best suits your needs.
ℹ️ Choose ad formats for your AD Code
Choose the Video/in-stream-ad option since this guide is about Video.
There are a lot of potential modifications available if you wish to make changes. Let’s explore them together.
ℹ️ Spot name
Spot name is filled in automatically
ℹ️ Skip time
It’s best to establish a minimum skip duration of 10 because it has a direct impact on traffic volume. If it is lower, there will be less traffic and money for both sides. While it is preferable to have more.
ℹ️ In-stream type
Choose between in-stream, overlay, out-stream, and slider
In-stream ads are played directly on the player on the website.
You can read about Frequency capping and Device targeting lower.
Overlay is set by default. Overlay ads are also used for in-stream placement realization, but they work differently since they overlay the original player of the website.
ℹ️ Selector: You can read about it lower
ℹ️ Playback: Select when to display the advertisement:
· at the Start of the video,
· when the user Pauses the video,
· at the End of the video.
Out-stream ads are displayed as banners on both mobile and desktop web pages, and are located outside of the video player.
ℹ️ Height percent: Recommended height percent is 25–30%.
ℹ️ Selector: You can read about it lower.
ℹ️ Close button delay: Specify the number of seconds after which the close button should appear.
Slider is a form of out-stream advertising that is not connected to the content of the website, but instead it is linked to the user’s screen.
ℹ️ Height percent: Recommended height percent is 25–30%.
ℹ️ Slider position: Position the slider on the desired side of the web browser window.
ℹ️ Close button delay: Specify the number of seconds after which the close button should appear.
ℹ️ Frequency capping
Frequency capping determines how many videos are shown within a certain timeframe. This setting may be something to explore after you become more familiar with the platform.
ℹ️ Device targeting
You can leave it as all devices, or you can choose between desktop and mobile.
ℹ️ Selector
The Selector field is required for Out-stream and Overlay ad formats, because it’s essential to know the exact location where an ad should be shown. You’ll need to provide the class or ID of the location you’ve chosen for ads on your website. How can you find the class or ID? It’s quite similar for both Out-stream and Overlay ads. Let’s explore this with an example of an Overlay ad.
Overlay is usually placed over the original player of your website. The selector is the element on which the Overlay will appear.
Here’s how you can detect the Overlay selector via Chrome Developer Tools:
The selector is highlighted on the DevTools panel on the right:
class=".video-container kg-video-container".
Thus, the selector for this example is: .video-container kg-video-container.
It can look different, though:
In this example, the highlighted part goes after ID:
id="#YHQSx0875184571792541".
Thus, the selector for this example is: #YHQSx0875184571792541.
Using the right prefix: .class VS #id
Your website can content either Class or ID selectors–this depends on how the website was coded. A class selector (.class) applies to any element with that class, while an ID selector (#id) targets only the specific element with that exact ID. Since classes and IDs look differently, please follow these rules when filling in the Selector field:
- When you have a class in your website’s code, you need to start the selector with a dot: .
- If there is an ID in the code, you need to start the selector with a hash: #
Both class and ID selectors are fine for either Out-stream or Overlay ads.
Now let’s copy our selector and paste it to the Selector field:
Moving on
And that’s what you could set within Video/in-stream ads if you wanted to modify it.
After it’s done, click on Create:
Your AD Code is created:

Step 4
Click on Copy snippet:

Click on Copy script:
Your script will be copied to clipboard.
Step 5
The script has been copied to the clipboard. This is your AD Code. The next step is to paste it into your website’s code. You can just insert the AD Code to the <head> or <body> of your website.
We recommend integrating the AD Code into the head section. This will assist in faster ads appearance when loading the web page.
Example:
for <head>
If you decide that inserting the code into the <body> section is more beneficial for your website, we recommend placing it as close to the beginning of your <body> section as possible.