Integrating AD Codes to your website
This article is here to guide you on how to add the AD Code you created to your website. Check out the video tutorial or follow the instructions below the video.
Video/In-Stream, Popunder, In-Page
In the case of Video, Popunder, and In-Page ads 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.
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.
Banner
When working with banners, you need to paste the AD Code with the container into your web page’s code. We recommend to paste the AD Code into the <head> section while the container should be in the <body>:
for <head>
for <body>
In this instance, the figures within the <div data-nat='6151'></div> represent the AD Spot ID on your website.
Web-Push
When working with push notifications, you need to download a JavaScript file and place it in a designated folder on your website. Follow these steps:
Step 1
Create the AD Code at OnClickA.
Step 2
Download the file named *****.js from your OnClickA account. Here’s how:
2.1. After you your AD Code is created, expand it:
2.2. Click on Download the service worker file:
2.3. The *****.js file will be downloaded:
Step 3
3.1. Navigate to the root folder of your website and create a new folder named: ps. Please do not rename this folder. Names PS, Ps, pS will not work.
3.2. Upload the *****.js file into the ps folder.
3.3. Integrate the AD Code into the head or body section:
for <head>
Please ensure that you place the *****.js file within the ps folder located at the root of your server.
- do not rename the file and do not change the name of the folder: names PS, Ps, pS, Js, jS, JS will not work
- do not duplicate the ad codes and ad spots