Introduction
Adskeeper widget (Simple JS) code is a website-level Adskeeper installation code that publishers use to integrate widgets on a website. The Simple JS tag is designed to be lightweight and efficient. It minimizes site impact and requires no extra work from publishers.
The widget installation code consists of two components:
- Head Script: the Adskeeper preloader should be placed inside the website <HEAD> section.
- Body Container: this is the div element where the Adskeeper widget should be rendered inside a blog post.
Create the desired ad units (widgets) in the dashboard and get the widget codes.
Adskeeper widget code (Simple JS) direct placement
SimpleJS prioritizes fast website loading. There are no external dependencies; integrate widget directly into your website code, eliminating the need for plugins and extra loader blocks that can slow things down. SimpleJS loads in parallel with the rest of your website, ensuring it doesn't hold up for initial page load speed.
To install the code, follow these steps:
- Open your HTML editor app of choice. The process is the same for any editor (for example, we’ll use an online editor with a compiled site preview).
- Locate the <head> section and paste the <head> code part anywhere inside the <head> section. The best practice would be to place it somewhere at the top so it starts loading faster and is easier to locate.
You only need to use this code part in one location for efficiency.
3. For each widget you want to display, copy and paste its corresponding <body> code part snippet into the designated area of your page where you want the widget to appear.The screenshot below shows two widgets placed - the smart widget and the impact in-article widget.
For optimal results, position widgets in their intended locations.
Save the changes and test if everything is placed correctly. Adjust if needed. The widget will appear in the setup spots.
There are other units you can place utilizing the same method, changing only the placements and <body> code parts. You don't have to change the <head> code if it’s already on the page.