VK Ads - advertising on VK projects in a new way
Home
News
Education
Insights
Events
Online courses
Certification
Case studies
Upvote
Monetization
Загружается...
Help Center
Registration
Help Center
Log-in
Creating and logging in to an account
Transfer campaigns and audiences
Transferring campaigns from myTarget
Transferring campaigns from VKontakte
Importing audiences from myTarget
Importing audiences from VKontakte
Connecting an account to an agency
For agencies: registration and import
Account overview
Multi-accounts
Connecting a VK ID
Deleting an account
Creating ads
How to create ads
Stages of creation
Ad limit
Statuses of campaigns, groups and ads
Editing campaigns, groups and ads
Copying campaigns, groups and ads
Deleting and restoring campaigns, groups and ads
Banner preview
Adding a redirect to the white list
Sites
Link markup for click verification
Site Advertising
VK Ads Pixel
Audience tags
Sending offline events to the pixel
Conversion attribution for websites
Visual constructor
Site Audience Portrait
Feed catalogs
Creating a catalog for a marketplace
Feed Advertising for sites and apps
Feed Advertising for VK Communities
Feed Advertising for marketplaces
Commercial Center (interface)
Commercial Center
Goods
Product Groups
Diagnostics
Events
History
Catalogs
Catalogs - what it is, how to create, edit and delete
General requirements for catalogs
Catalog for products according to Google specification
Catalog for products according to Yandex specification
Catalog for real estate
Catalog for real estate according to Yandex specifications
Catalog for transport
Catalog for transport according to Yandex specifications
Catalog for services
Catalogs for flights
Catalogs for flights (Google specification)
Catalogs for hotels
Catalogs for hotels (Google specification)
Catalog for medicinal products according to Yandex specification
Catalog for medicinal products according to Google specification
Dynamic retargeting
Dynamic retargeting based on mobile events
Dynamic retargeting based on web events
Deep links and tracking links in catalog product ads
Macros in catalog product ads
Apps
Mobile app Advertising
Adding new apps
Integration of the application with mobile tracker
Integrating apps with MyTracker
Integrating apps with AppMetrica
Integrating apps with AppsFlyer
AppsFlyer tracking link requirements
Integrating apps with Adjust
Integration apps with Branch
Integrating apps with Tenjin
Integrating apps with Singular
Integration of applications from Huawei AppGallery with trackers
Integration RuStore apps with trackers
Campaigns for RuStore apps – optimization by events
Seamless app install from RuStore
App cards
SKAdNetwork
Tracking link macros
Deep links in mobile app advertising
Promotion in social networks
Video and stream Advertising
Music Advertising
How to post content in VK Music
VK Mini Apps & VK Games Advertising
How to send events from a mini-app
Personal profile advertising
How to set up a personal profile before promotion
Promotion of groups and profiles in OK
Community
Community Advertising
Smart сampaigns
Dzen
Dzen advertising
Scroll-to-site
Tips for launching Dzen campaigns
Lead forms and surveys
Lead form Advertising
Survey form Advertising
YCLIENTS online form Advertising
Split-test for lead forms
Creating a landing page for lead form warmup
Media advertising
Launching media adverts
Banner Ads media format
Video Ads media format
VK Post media format
VK post, video or clip media format
Dzen media format
HTML5 banner
Group and profile OK
Direct deals
For agencies
Agency account guide
Agency clients
Agency managers
Agency work with ADO VK
Access rights
Ads settings
Ad formats
Text and title of the ad
Text generation
Macros in the headline and text of the ad
Old_version_24_10_24_Text creatives autogenerator
Images and video
Media library
Video generation
Image generation
Editing images: zoom in, improve quality, image refine
Smart image cropp
Images created by neural network
Budget optimization
Bid strategies
Auction
Targeting
Auto selection of targeting
Audiences and user lists
Audiences
User lists
Importing external audiences
Similar audiences (look-alike)
Expanding audience
Collecting audiences by reactions
UTM-tags
REF-tags
Placements
Change logs block
Hotkeys
Universal Link/App Link technology on site
API - VK Ads
Safe areas
Advertising objective
Statistics and Finance
Working with dashboard
Metrics and expanded statistics
Evaluating campaign effectiveness
Report upload
Folders in the campaign list
For agencies: Client statistics
Statistics from apps for web campaign
Billing and finances
For agencies: Account balance, payments, and closing documents
Bonuses and promo codes
Documents
Moderation Rules
Rules
Rules for Placing Advertisements
Legal documents
Rules for Placing Advertisements_26.03.2024
Publisher account
How to start monetizing
Connecting additional partner accounts
Setting up a publisher account
Partner account setup
Partner account notifications
Ad blocking
Getting strings for your ads.txt and app-ads.txt files
App placement
Start monetizing your app
Types of ad units for apps
Site placement
Start monetizing your website
Types of ad units for websites
Adaptive block: code creation and integration
InStream block: access and creation
InPage placements: code customization and integration
Flyroll mode for inPage blocks on sites
Recommendation widget
Ads on sites with CSP
Plugin for WordPress websites
Finger Print ID
Integration documentation
Web guides
Web integration for placement on pages
Web integration for placement within video
Header Bidding
Events and codes of Adman3 player
Android guides
Google Privacy & Security recommendations
Android integration guide
Banner Android
Native block Android
Fullscreen block Android
Rewarded video Android
Version history SDK Android
Adapters for other mediations Android
Test mode Android
iOS guides
iOS integration guide
Banner iOS
Native block iOS
Fullscreen block iOS
Rewarded video iOS
Version history SDK iOS
Adapters for other mediations iOS
Test mode iOS
Unity guides
Unity integration guide
Banner Unity
Fullscreen block Unity
Rewarded video Unity
Test mode Unity
ironSource mediation
MAX mediation
User Data
Integration Testing
Statistics in the publisher's account
Monetization stats
Publisher documents
Legal documents of the VK Ad Network
VK Ad Network publisher terms and conditions
Changes to partner details
Money withdrawal for residents
Money withdrawal for non-residents
Inventory moderation guide
Standard contractual clauses
Реквизиты компании для партнеров-резидентов
API VK Ad Network
Reporting API
Reporting API: Statistics
Management API
Help
Technical support
Direct deals
Direct deals for traffic providers
Direct deals marketplace
Creating and customizing a direct deals
Editing a transaction
Statistics and downloading of reports on transactions
Log-in
Creating and logging in to an account
Transfer campaigns and audiences
Transferring campaigns from myTarget
Transferring campaigns from VKontakte
Importing audiences from myTarget
Importing audiences from VKontakte
Connecting an account to an agency
For agencies: registration and import
Account overview
Multi-accounts
Connecting a VK ID
Deleting an account
Creating ads
How to create ads
Stages of creation
Ad limit
Statuses of campaigns, groups and ads
Editing campaigns, groups and ads
Copying campaigns, groups and ads
Deleting and restoring campaigns, groups and ads
Banner preview
Adding a redirect to the white list
Sites
Link markup for click verification
Site Advertising
VK Ads Pixel
Audience tags
Sending offline events to the pixel
Conversion attribution for websites
Visual constructor
Site Audience Portrait
Feed catalogs
Creating a catalog for a marketplace
Feed Advertising for sites and apps
Feed Advertising for VK Communities
Feed Advertising for marketplaces
Commercial Center (interface)
Commercial Center
Goods
Product Groups
Diagnostics
Events
History
Catalogs
Catalogs - what it is, how to create, edit and delete
General requirements for catalogs
Catalog for products according to Google specification
Catalog for products according to Yandex specification
Catalog for real estate
Catalog for real estate according to Yandex specifications
Catalog for transport
Catalog for transport according to Yandex specifications
Catalog for services
Catalogs for flights
Catalogs for flights (Google specification)
Catalogs for hotels
Catalogs for hotels (Google specification)
Catalog for medicinal products according to Yandex specification
Catalog for medicinal products according to Google specification
Dynamic retargeting
Dynamic retargeting based on mobile events
Dynamic retargeting based on web events
Deep links and tracking links in catalog product ads
Macros in catalog product ads
Apps
Mobile app Advertising
Adding new apps
Integration of the application with mobile tracker
Integrating apps with MyTracker
Integrating apps with AppMetrica
Integrating apps with AppsFlyer
AppsFlyer tracking link requirements
Integrating apps with Adjust
Integration apps with Branch
Integrating apps with Tenjin
Integrating apps with Singular
Integration of applications from Huawei AppGallery with trackers
Integration RuStore apps with trackers
Campaigns for RuStore apps – optimization by events
Seamless app install from RuStore
App cards
SKAdNetwork
Tracking link macros
Deep links in mobile app advertising
Promotion in social networks
Video and stream Advertising
Music Advertising
How to post content in VK Music
VK Mini Apps & VK Games Advertising
How to send events from a mini-app
Personal profile advertising
How to set up a personal profile before promotion
Promotion of groups and profiles in OK
Community
Community Advertising
Smart сampaigns
Dzen
Dzen advertising
Scroll-to-site
Tips for launching Dzen campaigns
Lead forms and surveys
Lead form Advertising
Survey form Advertising
YCLIENTS online form Advertising
Split-test for lead forms
Creating a landing page for lead form warmup
Media advertising
Launching media adverts
Banner Ads media format
Video Ads media format
VK Post media format
VK post, video or clip media format
Dzen media format
HTML5 banner
Group and profile OK
Direct deals
For agencies
Agency account guide
Agency clients
Agency managers
Agency work with ADO VK
Access rights
Ads settings
Ad formats
Text and title of the ad
Text generation
Macros in the headline and text of the ad
Old_version_24_10_24_Text creatives autogenerator
Images and video
Media library
Video generation
Image generation
Editing images: zoom in, improve quality, image refine
Smart image cropp
Images created by neural network
Budget optimization
Bid strategies
Auction
Targeting
Auto selection of targeting
Audiences and user lists
Audiences
User lists
Importing external audiences
Similar audiences (look-alike)
Expanding audience
Collecting audiences by reactions
UTM-tags
REF-tags
Placements
Change logs block
Hotkeys
Universal Link/App Link technology on site
API - VK Ads
Safe areas
Advertising objective
Statistics and Finance
Working with dashboard
Metrics and expanded statistics
Evaluating campaign effectiveness
Report upload
Folders in the campaign list
For agencies: Client statistics
Statistics from apps for web campaign
Billing and finances
For agencies: Account balance, payments, and closing documents
Bonuses and promo codes
Documents
Moderation Rules
Rules
Rules for Placing Advertisements
Legal documents
Rules for Placing Advertisements_26.03.2024
Publisher account
How to start monetizing
Connecting additional partner accounts
Setting up a publisher account
Partner account setup
Partner account notifications
Ad blocking
Getting strings for your ads.txt and app-ads.txt files
App placement
Start monetizing your app
Types of ad units for apps
Site placement
Start monetizing your website
Types of ad units for websites
Adaptive block: code creation and integration
InStream block: access and creation
InPage placements: code customization and integration
Flyroll mode for inPage blocks on sites
Recommendation widget
Ads on sites with CSP
Plugin for WordPress websites
Finger Print ID
Integration documentation
Web guides
Web integration for placement on pages
Web integration for placement within video
Header Bidding
Events and codes of Adman3 player
Android guides
Google Privacy & Security recommendations
Android integration guide
Banner Android
Native block Android
Fullscreen block Android
Rewarded video Android
Version history SDK Android
Adapters for other mediations Android
Test mode Android
iOS guides
iOS integration guide
Banner iOS
Native block iOS
Fullscreen block iOS
Rewarded video iOS
Version history SDK iOS
Adapters for other mediations iOS
Test mode iOS
Unity guides
Unity integration guide
Banner Unity
Fullscreen block Unity
Rewarded video Unity
Test mode Unity
ironSource mediation
MAX mediation
User Data
Integration Testing
Statistics in the publisher's account
Monetization stats
Publisher documents
Legal documents of the VK Ad Network
VK Ad Network publisher terms and conditions
Changes to partner details
Money withdrawal for residents
Money withdrawal for non-residents
Inventory moderation guide
Standard contractual clauses
Реквизиты компании для партнеров-резидентов
API VK Ad Network
Reporting API
Reporting API: Statistics
Management API
Help
Technical support
Direct deals
Direct deals for traffic providers
Direct deals marketplace
Creating and customizing a direct deals
Editing a transaction
Statistics and downloading of reports on transactions
VK Ads - advertising on VK projects in a new way
A platform for quickly launching effective advertising on VK projects. Allows you to interact with users of social networks, classifieds, media projects and advertising networks, turning them into your customers.
Registration
Sections
  • News
  • Insights
  • Case studies
  • Events
  • Help Center
  • Documents
  • Monetization
Contact us
international@vk.team
localization
en
About us
© 2025 VK
Web guides

Web integration for placement within video

  • Help
  • Publisher account
  • Integration documentation
  • Web guides
Reading time 8 min

AdMan SDK is a library that is embedded into a video player and displays an ad, providing support for VAST/VPAID.

AdMan SDK embeds video ads into the content on websites of VK Ad Network's partners, and any third-party video player can be used to play the videos. 

Learn more about how to create an InStream video ad

Integration instruction

The SDK mode returns a player object that provides methods to control it.

Accordingly, there is no way to control the player's behavior, and ads are loaded when the player starts.

The ad starts when more than 50% of the ad unit can be seen by the user.

In the SDK mode, working with AdMan3 player consists of two steps:

  1. Core initialization
  2. Creating a player instance

AdMan SDK core initialization

In cases where only the core AdMan SDK is initialized without creating player instances, place the code in the head or body section of the webpage:

<script async src="https://ad.mail.ru/static/vk-adman.js?sdk=1"></script>

It is crucial to specify the sdk variable with any value (?sdk=1). As a result, an AdMan SDK interface will be created at the browser level in the window object of the current web page to produce player instances. 

Creating an AdMan3 player instance

After downloading and initializing the AdMan SDK core to display ads, create one or more instances of the player, saving them respectively to one or more variables (or to an array/object) for further use. Example of creating an individual player instance:

const player = new window.AdManSDK();

For further work with the player, call player methods, for example, player.pause(). 

Example of creating ten player instances:

const players = new Array(10);
for (let i=10; i--;) {
  players[i] = new window.AdManSDK();
}

or

const players = [];
for (let i=10; i--;) {
 players.push(new window.AdManSDK());
}

Each instance created is completely independent of other instances. It is initialized in an individual container and controlled by calling the methods of the corresponding instance.

Primary instance initialization

For initialization, call the init method of a previously created instance. 

Possible configuration keys and their values:

KeyTypeValueDescription
containerstring | string[]By default:  #adman-adsCSS selector or selector array of the html element in which the player will be placed.
slotstring Placement ID – required fields with ad unit identifier. You can find it in the block settings after creating the block.
slotstringBy default:  "preroll""preroll" | "midroll" | "postroll" | “pauseroll”
dataAdQuerystring 

Parameters transmitted: 

dl (urlencode string) – a mandatory parameter with the URLs hosting the player;

content_id (integer) – recommended parameter with content (video) identifier on the partner's website.

Example of player instance initialization:

const player = new window.AdManSDK();
const initConfig = {
  container: "#adcontainer",
  slot: 1133888
};
const result = player.init(initConfig);

In the above example, the initialization process on the web page searches for a container with the adcontainer identifier in which the elements required for the ad display will be created. The ad information will be requested from ad unit 1133888. The ad request is a part of the initialization process. 

Methods can be called without saving the result of execution:

const player = new window.AdManSDK();
const initConfig = {
 container: "#adcontainer",
 slot: 1133888
};
player.init(initConfig);

When the instance is successfully initialized, the onReady callback is called.

Start of ad display

An ad must be expressly started by calling the start method (without parameters):

const result = player.start();

Note that calling the start method may not directly start the ad display if the user can see less than 50% of the ad unit height. In this case, the display of ads will begin as soon as at least 50% of the ad unit height is within the user's line of sight. The ad display is also suspended (paused) if more than half of the ad unit is out of visibility.

If the start method (or any other ad display control method) is called, error 5002 (NotInited) returns for the player instance that has not been initialized. Calling the start method for an instance with an ad that is already playing will return error 5006 (AlreadyStarted), while calling it for a deinitialized instance will return error 5007 (Destroyed). Also note that the start method is not used to resume suspended (paused) ads – for this, use the resume method.

Errors 5002 (NotInited) and 5007 (Destroyed) are returned in these cases and when other control methods are called.

The onStarted and onPlayed callbacks are called when the ad has started successfully.

Events and codes of Adman3 player

For events and codes of Adman3 player please follow the link

Display suspended (paused)

In addition to pausing the display of ads in cases where the user can see less than half of the ad unit height, the ad can also be paused by calling the pause method (without parameters):

const result = player.pause();

When the display is paused, the container continues to show the current ad fragment and the countdown stops. The relevant provisions specified in the previous sections apply to the result returned by the method and the possibility of ignoring it. If the method is called again (ad paused), error 5004 (NotPlaying) is returned.

The onPaused callback is called when the ad has been paused successfully.

Resuming the display

The resume method (without parameters) is used to resume playing the ad:

const result = player.resume();

If the method is called when the display is not paused, error 5005 (NotPaused) returns.

The onPlayed callback is called when the ad has been successfully resumed.

Stopping the display

The stop method (without parameters) is used to stop playing the ad:

const result = player.stop();

During the stopping process, the player instance is reset (deinitialized). Subsequent calls of control methods will return error 5002 (NotInited). In addition, all elements of any given player instance are removed from the web page. 

The onClosed callback is called when the ad has been successfully stopped.

Skipping the ad

Use the skip method (without parameters) to skip the current ad and move to the next ad in the unit:

const result = player.skip();

If there is no next video to show, the player instance is reset (deinitialized). 

The onSkipped callback is called when the ad has been successfully skipped.

Instance deinitialization

To force a reset (deinitialization) of a player instance, the destroy method (without parameters) is used:

const result = player.destroy();

Unless the instance has been initialized, the method call will return error 5002 (NotInited). Calling the method on an instance that has already been deinitialized will return error 5003 (AlreadyDestroyed).

Unlike calling the stop method, calling the destroy method does not call the onClosed callback.

If the method is successful, the internal data structures of the instance will be cleared and the elements of the respective player instance will be removed from the web page. The instance can then be reinitialized with the new configuration.

Volume control

The setVolume method with a single numeric parameter defining the volume level is used to control the ad sound volume (if the ad is accompanied by an audio):

const result = player.setVolume(0.5);

The volume values ranges from 0.0 (sound off) to 1.0 (maximum volume).

Contents