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 on pages

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

Integration of ad units on websites

For direct integration, copy the js code from the ad block settings and place it in the HTML between <body> and </body> tags, where the ad should be displayed.

Please note that if you need to call one slot_id more than once on a page, then you need to make slot_id unique using slot_id.N (where N is a sequence number).

Also change class in the ins tag to unique. For example,
<ins class="mrg-tag-1"...>
<ins class="mrg-tag-2"...>

Otherwise, the script will send everything in one block, and this block will be filled with the last arrived banner.

For integration via Header Bidding from AdFox, use the instructions.

Banners

slot_id in the code example is the same as the Placement ID. You can find it in the block settings after creating the block.

The finished code will look like this:

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:inline-block;text-decoration: none;"
data-ad-client="ad-1399367"
data-ad-slot="1399367">
</ins>  
<script>
(MRGtag = window.MRGtag || []).push({})
</script>
 

240х400

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:240px; height:400px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%">
</ins> 
<script>
(MRGtag = window.MRGtag || []).push({})
</script>
 

300х300

   <script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:300px; height:300px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%">  
</ins> 
<script>
(MRGtag = window.MRGtag || []).push({});
</script>
 

300х250

   <script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:300px; height:250px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%">
</ins>   
<script>
(MRGtag = window.MRGtag || []).push({});
</script>
 

300х600

   <script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:300px; height:600px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%">  
</ins> 
<script>
(MRGtag = window.MRGtag || []).push({});
</script>
 

320x100

   <script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:320px; height:100px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%">  
</ins> 
<script>
(MRGtag = window.MRGtag || []).push({});
</script>
 

728x90

   <script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:728px; height:90px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%">  
</ins> 
<script>
(MRGtag = window.MRGtag || []).push({});
</script>
 

970х250

   <script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
   style="display:inline-block; width:970px; height:250px; text-decoration: none;"
   data-ad-client="ad-%slot_id%"
   data-ad-slot="%slot_id%"> 
</ins>  
<script>
(MRGtag = window.MRGtag || []).push({});
</script>
 

Adaptive placement

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
data-ad-client="ad-%slot_id%"
data-ad-slot="%slot_id%">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

AMP

AMP MEDIUM (300x250)

<amp-ad 
   width="300" 
   height="250"
   type="mytarget"
   data-ad-slot="%slot_id%">
</amp-ad>

AMP STANDARD (320x50)

<amp-ad 
   width="320" 
   height="50"
   type="mytarget"
   data-ad-slot="%slot_id%">
</amp-ad>

AMP LEADERBOARD (728х90)

<amp-ad 
   width="728" 
   height="90"
   type="mytarget"
   data-ad-slot="%slot_id%">
</amp-ad>

Additional documentation

Interstitial (mobile full screen)

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
data-ad-client="ad-%slot_id%"
data-ad-slot="%slot_id%">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

slot_id in the code example is the same as the Placement ID. You can find it in the block settings after creating the block.

The finished code will look like this:

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
data-ad-client="ad-ad-1399367"
data-ad-slot="1399367">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

Native ads

Native ad for desktop

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:block;text-decoration: none;"
data-ad-client="ad-%slot_id%"
data-ad-slot="%slot_id%">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

slot_id in the code example is the same as the Placement ID. You can find it in the block settings after creating the block.

The finished code will look like this:

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:block;text-decoration: none;"
data-ad-client="ad-1399367"
data-ad-slot="1399367">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

Native ad for mobile device

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:inline-block;width:100%;height:50px"
data-ad-client="ad-%slot_id%"
data-ad-slot="%slot_id%">
</ins> 
<script> (MRGtag = window.MRGtag || []).push({});
</script>
 

slot_id in the code example is the same as the Placement ID. You can find it in the block settings after creating the block.

The finished code will look like this:

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:inline-block;width:100%;height:50px"
data-ad-client="ad-1399367"
data-ad-slot="1399367">
</ins> 
<script> (MRGtag = window.MRGtag || []).push({});
</script>
 

320x50 ad (sticky)

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:inline-block;width:320px;height:50px"
data-ad-client="ad-%slot_id%"
data-ad-slot="%slot_id%">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

slot_id in the code example is the same as the Placement ID. You can find it in the block settings after creating the block.

The finished code will look like this:

<script async src="https://ad.mail.ru/static/ads-async.js"></script>
<ins class="mrg-tag"
style="display:inline-block;width:320px;height:50px"
data-ad-client="ad-1399367"
data-ad-slot="1399367">
</ins>  
<script>(MRGtag = window.MRGtag || []).push({})
</script>
 

Contents