Using S2S With Microsoft Ads

This article covers how to set up FunnelFlux to send conversion data to Microsoft Ads using their API and the "msclkid" click tracking parameter.

Please note this integration is in beta, and note the following limitations:

  1. If you have multiple accounts, you will need to make a separate traffic source in FunnelFlux per account so that you can set different account IDs in the custom scenario config. Likewise for conversion action IDs.
  2. MS Ads does not allow pushing conversion data until at least 2 hours post-click. So there is a minimum delay of 2 hours before a conversion will appear in the MS Ads UI, though it will have the correct conversion time there.

The Microsoft Ads Custom Scenario

Firstly, go to make a new traffic source in FunnelFlux Pro. Type in the name field and pick the Microsoft Ads template.

Now navigate to the conversion tracking tab. You should see this:

So, we need to get a few pieces of info:

  • The ad account ID
  • Your Microsoft Customer ID
  • A conversion goal ID
  • A refresh token (will generate later)

Gathering Data From Microsoft Ads

Log into your MS Ads account. From here we'll try to get a lot of things in one go.

Head over to the conversion goals section:

Click "create conversion goal" if you have not done so already.

One limitation right now is that your conversion goal is defined in the traffic source config in FunnelFlux -- so you can only set one option. So I would make a generic conversion goal like form submit or purchase that you want to generally use for this MS Ads traffic source. We may improve this later.

Choose Offline as the conversion type:

Choose a conversion goal category -- I am going to choose submit lead form, as an example (you can pick anything):

Once selected, pick the offline conversions option that appears > next.

Now, pick a name for the goal. Avoid spaces and make it simple like Conversion, SubmitForm, Lead etc. For the revenue you can put conversion price may vary and put a default value of zero. This way it will use the payout we send to MS Ads.

Click Save and Next then Done. You should be returned to the conversion goals page.

Now the secret ninja move to get all the details you need: click on the new goal's name to edit it. Now, copy the URL from the address bar. 

It should look something like this:


In this URL we have a lot of the data we need:

  • goalId = the ID of the goal
  • aid = the account ID
  • cid = the customer ID

Silly that we have to find these parameters from a URL, but there's no other obvious place in the user interface for them!

A refresh token is required, so if you want to save, just put some random text in the box for now.

Getting a Refresh Token

This is generated by our FunnelFlux MS app. You can access this in the integrations section at

Here, scroll down and find the Microsoft Ads section:

Click the sign in button to open our auth flow in a new tab. You will need to log in with your Microsoft account to allow our app access to upload conversions on your behalf. \

This must be the same account that has access to the ad account from earlier.

Note our app says unverified -- to get "verified" takes an onerous amount of work and is not possible for a small app like this, so don't worry about it (doesn't mean the app isn't actually approved by MS, think of it like the blue verified ticks on IG and Twitter).

Once you continue, you will be redirected to a page where our integration provides a refresh token value:

Copy the full refresh token value and use that in the custom scenario config. Make sure to delete any existing value there first, and that you have not included any random whitespace. If in doubt, copy/paste the token into a text editor first to check it carefully.

Now you should have all the values you need!

How the Integration Works

Firstly, our traffic source template has our external ID renamed to msclkid with a blank placeholder, as below:

Because of this, when you generate tracking links, we will NOT append an msclkid value (we don't want to as Microsoft automatically adds this to click URLs), but if one is passed we will capture it as the external click ID parameter.

So, when users click ads, we capture that click ID, and when conversions happen, we can pass that click ID along with other data like the account ID, conversion goal ID etc., to a conversion queue.

We then store a log of conversion data on our side and each hour a job runs that checks for conversions where the initial click time is >2 hours ago. If it is, we try to send it to your Microsoft Ad account using all the data provided.

Note that we store your account IDs and corresponding refresh tokens separately from the conversion data, and its updated/checked when conversions happen.

Thus, if you ever need to update the refresh token you can do so, and eventually it will process older conversions that may have been bouncing. However if the ad account ID, goal ID or other properties were wrong at the time of conversion, you will need to ask us for help there, as it will be stuck forever in queue and unable to process.

Any other questions? Just reach out!

Was this article helpful?