A catalog of 50,000 products generates a YML file in 15 minutes — the server crashes, ads don't launch. A typical situation for online stores on 1C-Bitrix. We rewrote queries with tagged caching and agents — generation time reduced by 7.5 times, to 2 minutes. Ads launched first time. Clients save up to 30% budget due to up-to-date prices and product availability. On one project, after implementing the server-side API, conversion increased by 25% and cost per lead decreased by 18%. Proper integration allows VK to segment audiences more accurately and reduce cost per click by 15–20%.
According to VK Ads documentation, for correct operation of dynamic ads, transmitting the purchase event via server-side API is mandatory.
How to Export a Product Feed for VK
VK accepts feeds in YML (Yandex Market) format or its own JSON format. Bitrix has built-in export to YML via the catalog module: "Shop → Export goods → Yandex.Market". We use the same file for VK. Important: the YML should only contain products in stock with correct currencies. For proper display, all images must be in absolute URLs.
Configure the export:
- Select the information block and catalog sections.
- Enable image export —
PICTUREin absolute URLs. -
OFFER_URLtemplate — URL of the product detail page. - Specify price types, currency, and delivery settings.
The feed is saved to a path (e.g. /upload/vk_feed.xml) and updated by an agent every 2–4 hours. In your VK Ads account, add the feed via URL https://your-site.ru/upload/vk_feed.xml. More about YML format in the CommerceML documentation.
Installing the VK Pixel
VK Pixel is a JavaScript code that tracks visitor actions. Obtain your pixel ID in "VK Ads → Audiences → Pixels".
Insert the pixel code into the site template. In Bitrix, this is done via "Settings → Product Settings → Analytics" or directly in the header.php file. Alternatively, use Google Tag Manager.
| Event | Where it is called | Parameters |
|---|---|---|
VK.Goal('view_home') |
Homepage | none |
VK.Goal('view_product', {products: [{id: 'ID', price: PRICE}]}) |
Product page | id, price |
VK.Goal('add_to_cart', {...}) |
Cart | id, price, quantity |
VK.Goal('purchase', {products: [...], value: TOTAL}) |
Order | products, value |
In the catalog.element component template, add JavaScript with VK.Goal calls and data from $arResult.
Which Events to Send to VK Pixel?
For retargeting and optimization, four events are sufficient: homepage view, product view, add to cart, purchase. Be sure to pass product ID and price. For purchase, also pass the total amount. This allows VK to build audiences like "viewed but not purchased" and "abandoned cart", and optimize bids for conversions.
Why Use Server-Side VK API?
The browser pixel is blocked by AdBlock and doesn't work for offline conversions. Server-side VK API (Conversions API) sends data from your server. When an order is paid, in the OnSaleOrderPaid handler, send a POST to https://api.vk.com/method/ads.checkRetargetingPixelDomain using \Bitrix\Main\Web\HttpClient.
Accuracy comparison:
| Method | Attribution Accuracy | AdBlock Dependency |
|---|---|---|
| Browser pixel | 60–70% | Yes |
| Server-side VK API | 95–98% | No |
Server-side VK API is 1.5 times more accurate than the browser pixel. Server-side sending is mandatory for accurate statistics under 54-FZ and for proper retargeting.
Typical Problems and Solutions
- Error in YML: images without absolute URLs — VK won't load product cards. Check
PICTUREsettings. - Pixel doesn't fire: conflict with other scripts or incorrect pixel ID. Check browser console.
- Purchases not recorded: set up server-side API — browser pixel loses up to 30% of events.
Example purchase event code
// handler OnSaleOrderPaid use Bitrix\Main\Web\HttpClient; $http = new HttpClient(); $http->post('https://api.vk.com/method/ads.checkRetargetingPixelDomain', [ 'access_token' => 'TOKEN', 'pixel_id' => 'PIXEL_ID', 'events' => json_encode([[ 'event_name' => 'purchase', 'event_time' => time(), 'user_id' => $userId, 'products' => $products, 'value' => $total ]]) ]); Work Process
- Audit — check current feed, catalog structure, pixel settings.
- Design — choose export architecture considering catalog size (up to 100,000+ items).
- Implementation — write custom agents, caching, event handlers.
- Testing — verify on staging and live server, compare events.
- Deployment and documentation — hand over instructions for the marketer.
What We Configure (Deliverables)
- Product export to YML with optimized queries and agent schedule.
- Install VK pixel code into site template.
- JavaScript events on product, cart, and success order pages.
- Server-side purchase event via Conversions API on
OnSaleOrderPaid. - Feed linking to VK ad account for dynamic ads.
- Setup documentation and marketer instructions.
Timeline and Cost
Basic setup takes 2 to 4 days. If custom fields, 1C integration, or large catalog (over 100,000 items) are needed, the timeline extends to 7 days. Cost is calculated individually after auditing your site.
Our team consists of certified specialists with 8+ years of Bitrix experience. We guarantee correct feed and pixel operation. Get a consultation — contact us. Contact us for an audit of your project.

