Bing Ads with Custom Push

This article describes a broad overview of how you could create a custom push to bing ads #

This guide assumes that you already set up an microsoft OAuth account with the scope ““. If this is not the case please check out this article Microsoft OAuth.

The push will send the information to the bing ads API via the “ApplyOfflineVersions” method.

This method creates an offline conversion using the given microsoft click id.

In addition this guide assumes you already set up an offline conversion goal in your bing ads account with auto tagging enabled. To learn how to set up your account please check out the bing ads documentation.


What do we need? #

Variable Description
CustomerAccountId The id of your ads account that will receive the information. Where to find the Account and Customer Id
CustomerId The id of your ads account that will write those information. Where to find the Account and Customer Id
DeveloperToken To write information to the ads api you need to create a developer token. How to create a developer token


Where to find the CustomerAccountId & CustomerId? #

These values are within the url of your campaign in bing ads. The fields are named “aid” and “cid”.

The value of “aid” is your CustomerAccountId and the value of “cid” is the CustomerId.


How to setup an developer token? #

The setup instructions for a developer token can be found using the following link to microsoft’s documentation. How to create a developer token

Set up push in the matelso control center #

To setup the push in the matelso control panel we navigate to “Configuration” -> “Integrations 2.0” and click on “Custom”.

In the form we enter the name of this push and an event trigger. For this example I use the name “Bing Ads” and the trigger “POST-Call”. Which trigger do I need (Pre or Post)?


After configuring these values we add an filter that prevents the push from being triggered if there is no microsoft click id (“MSCLKID”).

After that we jump to the end of the page and configure where to send the push. For Bing Ads we setup the following url:

After splitting the url to the correct form fields it looks like the following screenshot:

Now that we have configured when, under what conditions and where data should be transferred, it is time to set which data we want to transfer.

In the “What?” section of the Control Panel page, we first set up 2 HTTP request headers:

After that we choose “POST” as the HTTP-Method.

Now we fill in the “POST Body”.
Bing Ads is a so called SOAP Api which means we have to fill in a quite big chunk of XML with some placeholders we need to replace.

<s:Envelope xmlns:i="" xmlns:s="">
<s:Header xmlns="">
<Action mustUnderstand="1">ApplyOfflineConversions</Action>
<AuthenticationToken i:nil="false"> {{configData.accounts.basicOAuth2Credentials.msoauth.accessToken}} </AuthenticationToken>
<CustomerAccountId i:nil="false">$CustomerAccountId$</CustomerAccountId>
<CustomerId i:nil="false">$CustomerId$</CustomerId>
<DeveloperToken i:nil="false">$DeveloperToken$</DeveloperToken>
<ApplyOfflineConversionsRequest xmlns="">
<OfflineConversions i:nil="false">
<ConversionCurrencyCode i:nil="false">EUR</ConversionCurrencyCode>
<ConversionName i:nil="false">$ConversionGoalName$</ConversionName>
<ConversionTime> {{callData.totalCallBeginTime.datetimeFormatter(yyyy-MM-ddTHH:mm:ss)}} </ConversionTime>
<ConversionValue i:nil="false">1</ConversionValue>
<MicrosoftClickId i:nil="false"> {{webData.location.query.msclkid.attribution(LASTNOTEMPTY)}} </MicrosoftClickId>

We look for the following placeholders and replace them accordingly:

Placeholders Description
$CustomerAccountId$ The CustomerAccountId we looked up earlier..
$CustomerId$ The CustomerId we looked up earlier..
$DeveloperToken$ Our freshly created developer token..
$ConversionGoalName$ Name of our offline conversion goal we set up in Bing Ads.

We look for the following placeholders and replace them accordingly:Now we click the “save” button and connect our push to the pools or the partner id.

matelso platform
matelso optimally connects telephony, chat, email or contact forms. Our intelligent lead management simplifies communication and enables you to achieve better marketing results.
matelso platform in detail
Call Tracking

MarTech phone call analysis software for companies, agencies & portals to get valuable data from inbound calls.

Call Tracking in detail
Marketing Use Case
How the matelso platform boosts your marketing.
Sales Use Case
How the matelso platform boosts your sales process.
E-Commerce Showcase

Showcase of the matelso platform in E-Commerce

What capabilities does our matelso platform offer? All features at a glance.
Do-it-with-me instead of DIY: Work with our consultants to really get the most out of the platform.
Do-it-with-me instead of DIY: Achieving more together with our consultants.
Use Cases

Three industries that should rely on call tracking: B2B, automotive and agencies!

Blog Through our blog, we share knowledge and insights with our readers - always useful, always interesting.
Webinars With our matelso webinars, you can experience our MarTech technologies and solutions and get valuable tips for your online marketing.
Knowledge Base On our matelso Knowledge Base you can delve deep into the engine room of our Call Tracking and MarTech technology.


Career Creating a new data-based era of communication - if you share this vision, we should get to know each other.
Partner model Help your customers better understand and manage their customer journey - while also generating a new revenue stream.


About Us The MarTech company matelso - we stand for innovative and simple solutions that make your marketing more efficient.
Newsroom News, press releases and more - all news about matelso at a glance.