Knowledge Base         


How do I create a Postback URL for my network?


If all you want to know is how to create a specific Postback URL for ClickMagick, you’re in the right place.

If, on the other hand, what you’re really looking for are the ins-and-outs of using Postback URLs to track conversions and you want to understand the overall topic better, you should read this article instead:

How do I track sales using Postback URLs?


This article has a full discussion of using Postback URLs for server-to-server communication. It also includes set up videos, step-by-step walkthroughs, and so on.

So, if you already know all about Postback URLs and you just want to grab ClickMagick’s version of one, you can use ClickMagick’s Postback Builder tool which gives you a 1-click method for creating your Postback URLs!

You can always find the Postback Builder in the Tools menu at the top of any page.


But what if the Postback Builder doesn’t list my network?

If you need to create a Postback URL for a network that isn’t already listed in the Postback Builder (which is unlikely), you can always post a ticket in our Helpdesk, but it’s generally easy enough to construct one yourself with a little guidance. That’s what we’ll cover here.

 
Note: This explanation assumes that you know what a “query strings” are and how to manipulate them. If you need a quick overview of what query strings are, take a moment to read this article:
 
What is a “query string”?

This discussion also assumes that you’re thoroughly familiar with Postback URLs and how to set them up. If you need a refresher on that, go review the articles mentioned earlier.
  

To set up a Postback URL, you’ll need to know the name of the Sub-ID variable to pass the unique ID token through in your affiliate link. This will commonly be something like s1, aff_sub, or tid. Every network uses its own preferred name for the unique ID. If you don’t know what this is for your network, you can ask their support desk for this information.

The second thing you’ll need is the Postback URL itself. Here is the generic Postback URL for your account:

https://www.clkmg.com/api/s/post/?uid=[USERID]&s1=&amt=0.00&ref=

All you need to do is replace the 0.00 value with the commission token that your network uses, and set the s1= variable to the Sub-ID variable you passed the [clickid] or [cmc_vid] to in your affiliate link.

To find these two tokens, you can search online for these phrases:

     “How do I pass a click ID or tracking ID to network”, and
     “Postback URL tokens for network

where “network” is the name of your affiliate network.

You can also ask your network’s support desk this question:

“How do I pass a click ID (or tracking ID) to the network with my affiliate link, and what tokens should I use in my Postback URL to return the click ID and commission amount?”


Even if you are using Campaigns, you can still ask them how to pass a click ID, since we can use the information they provide to tweak our postback URL accordingly. Their support desk should give you the format for your affiliate link, and they should provide you with the tokens to use in your Postback URL.

For example, suppose they tell you to pass in the click ID using the aff_sub variable and that the click ID is returned in the Postback URL using the {{TRACKID}} token. Suppose they also tell you to use the {{COMM}} token to return the commission value in the Postback URL.

You would then add the query string variable at the end of your affiliate link like this:

https://www.myaffiliateprogram.com/...?aff_sub=[clickid] (for Tracking Links)
https://www.myaffiliateprogram.com/...?aff_sub=[cmc_vid] (for Campaigns)

And in your generic Postback URL, you would set the s1= value to {{TRACKID}} and set the amt= value to {{COMM}}, like this:

https://www.clkmg.com/api/s/post/?uid=[USERID]&s1={{TRACKID}}&amt={{COMM}}&ref=

As long as you pass the [clickid] or [cmc_vid] in to the network using the variable name they require, and you insert the Postback URL tokens properly in your generic ClickMagick Postback URL, you should be good to go!

To see examples of this, just select different networks in the Postback Builder and review the different Postback URL settings.


Article 210 Last updated: 07/02/2020 6:48:11 PM
https://www.clickmagick.com/kb/?article=210