myTarget Campaign Cabinet Integration with Bitrix24
A marketer runs campaigns in myTarget, collects leads through forms, and exports them from the cabinet once a day, manually entering them into CRM. By that time, some leads have cooled, others are lost in handoffs between colleagues. Campaign expenses are calculated in a separate spreadsheet, and the connection "click → lead → deal → payment" exists only in the marketer's head. Integrating myTarget with B24 closes the loop: leads enter CRM automatically, expenses are imported, and audiences are updated from CRM segments.
myTarget Lead Forms and Automatic Import
myTarget allows creation of lead forms (Lead Ads)—users leave applications in the Odnoklassniki feed or on Mail.ru properties without navigating to an external site. Form data is stored in the myTarget cabinet and accessible through API.
Integration works through myTarget API v2:
- A user completes a lead form on the myTarget platform.
- B24 periodically polls the myTarget API (or receives a webhook if configured) and retrieves new applications.
- For each application, a lead is created in CRM with populated fields: name, phone, email, data from custom form fields.
- A responsible manager is assigned, first-stage automation triggers.
Server-side integration is used—the application authorizes in myTarget through OAuth 2.0, obtains an access token, and requests data through GET /api/v2/lead_ads/vk_forms.json.
Form Field Mapping
myTarget lead form fields must be mapped to B24 CRM fields. Typical mapping:
| myTarget Field | B24 CRM Field | Note |
|---|---|---|
| first_name | Contact Name | Automatic |
| phone | Phone | Automatic |
| Automatic | ||
| city | City (custom field) | Requires field creation in CRM |
| Custom Field | UF_CRM_* | Manual mapping setup |
If the myTarget form contains hidden fields with UTM tags—they are transmitted to the lead and populate standard fields UTM_SOURCE, UTM_MEDIUM, UTM_CAMPAIGN.
Audience Export from CRM to myTarget
myTarget accepts audiences for targeting through Audiences → User Lists. Data is uploaded as phone and email hashes. B24 allows forming such lists from CRM segments.
Typical scenarios:
- Lookalike by buyers. Segment "Deals with 'Successfully Closed' status in the last 12 months" → hash export → myTarget builds a similar audience.
- Retargeting warm leads. Segment "Leads with 'In Progress' status, no activity for 7 days" → retargeting ads on Mail.ru and OK platforms.
- Exclude clients. Segment of current clients → exclude from acquisition campaigns.
Export is implemented through CRM Marketing → Audiences in B24. Data is hashed (SHA-256) before transmission—only hashes go to myTarget, not raw data.
For automatic audience updates, regular synchronization is configured: when a segment changes in CRM, new contacts are added to the myTarget audience, removed ones are excluded.
Expense Import from myTarget
myTarget API provides campaign statistics through GET /api/v2/statistics/campaigns/day.json. B24 retrieves:
- Daily expenses by campaigns and ads
- Impressions, clicks, CTR, CPC
- Conversion data (if tracking is configured)
In B24 end-to-end analytics, myTarget expenses are matched with leads and deals by UTM tags. The report shows the complete picture: campaign spend → number of leads → deal conversion → revenue → ROI.
For correct attribution, all links in myTarget ads must contain UTM tags. Recommended format: utm_source=mytarget&utm_medium=cpc&utm_campaign={campaign_id}. myTarget macros ({campaign_id}, {banner_id}) automatically substitute campaign and ad IDs.
Conversion Tracking
myTarget supports offline conversions—transmission of events from CRM back to the ad cabinet. This allows optimization by actual sales, not clicks.
Scheme:
- A counter is created in myTarget and a conversion goal is configured.
- When a deal closes in B24, a robot at the "Successfully Closed" stage sends a conversion event through myTarget API (
POST /api/v2/remarketing/conversions.json). - myTarget matches the conversion with the click by user_id or contact data hash.
- myTarget algorithms begin optimizing ad delivery to an audience more likely to make a purchase.
To transmit conversions, click_id binding is required (transmitted via GET parameter when clicking the ad) and CRM event. Click_id is saved in a custom lead field upon creation, then used when sending conversion.
myTarget vs. VK Ads Differences
myTarget and VK Ads are different ad platforms (though both belong to VK). APIs differ, data formats differ, audiences overlap partially. If running ads on both platforms—two separate integrations are needed. In B24 end-to-end analytics, they appear as different sources.
What We Configure
- Connecting the myTarget cabinet to B24 through OAuth 2.0 and synchronization setup
- Automatic lead import from myTarget lead forms into CRM
- Form field mapping to CRM fields, creating missing custom fields
- Setting up audience export from CRM segments to myTarget
- Expense import and end-to-end analytics connection
- Campaign tagging with UTM tags using myTarget macros
- Configuring offline conversion transmission from CRM to myTarget
- Testing complete chain: click → lead form → lead in CRM → UTM → expenses → conversion







