Knowledge Base      


Can ClickMagick send a Postback back to another service?


You bet! In ClickMagick, we call these “Custom Postbacks” and you can set one up for any Tracking Link, Tracking Link group, or Campaigns project so that when an Action, Engagement or Sale is generated, the custom postback request will be sent and your service will be notified.

To set up a custom postback, choose which type you’d like to set up, then follow the instructions:


 
1.    Get your Postback URL from the service you want ClickMagick to send the Postback to.
 
2.    Go to the Custom Postbacks tool in the Tracking Links Tools menu and click on the “New Custom Postback” button.
 
3.    Choose the Tracking Link or Link Group that you want to trigger the custom postback, select the Conversion Type, and enter your service’s Postback URL, including any ClickMagick tokens to send back the information that you’re interested in. These tokens are described in the next section.
 
4.    When you send clicks to your tracking link, you can also send a unique identifier that ClickMagick will return for you in your custom postback.  Simply pass the unique value in the clk_tid parameter of your link:

https://clkmg.com/[USERNAME]/golfclubs?clk_tid=<unique_value>

The unique value can be anything and is usually generated automatically for you by your traffic source—it will generally be a unique number or sometimes an email address. If you look up “postback” in the knowledge base of your traffic source, you should find instructions on how to generate this optional value.
 
Note: If you create multiple custom postbacks and a conversion would match more than one of them, only one custom postback will be sent.

ClickMagick will look for custom postbacks in the following order: the Tracking Link itself, the subgroup the Tracking Link is in, and finally, the top-level group the Tracking Link is in.


Which ClickMagick tokens are available for use in the Custom Postback URL?

If you use any of the tokens below in a custom postback URL, they will be replaced with actual values when the custom postback request is sent. For example, [amount] would be replaced with the actual amount for a Tracking Link sale.

For Tracking Links, the following tokens are available:

[clk_tid] [amount] [timestamp] [linkid] [clickid] [s1] [s2] [s3] [s4] [s5] [ref].

The tokens [s2] through [s5] can return two different values each. If the original postback URL has s2, s3, s4, or s5 parameters, those values will replace the corresponding tokens. If the postback URL does not have a particular value, then the corresponding sub-ID value of the original click will be used to replace the token.

The [clk_tid] token returns the clk_tid URL parameter value that was sent with the original tracking link.

The [timestamp] token is replaced with the time of the conversion in UTC format: 2022-01-27 22:55:19+0000

The [linkid] token is replaced with your Tracking Link ID.

The [clickid] token is replaced with a unique value that was sent to your Primary URL.


Can you show me an example?

With Tracking Links, you will generally use the [clk_tid] and [amount] tokens in your custom postbacks.

The [clk_tid] token represents the Click ID or Transaction ID that was originally sent to ClickMagick by the original service (typically a traffic source), and the [amount] token represents the amount of a sale that was made.

For example, if you were using the MGID service and they told you to use this postback URL with their service when a sale is made...

https://a.mgid.com/postback?c=<transactionID>&r=<sale-amount>&e=golf82573

…you would replace <transactionID> and <sale-amount> with ClickMagick’s [clk_tid] and [amount] tokens, like this:

https://a.mgid.com/postback?c=[clk_tid]&r=[amount]&e=golf82573

You would use this modified custom postback URL when creating a custom postback in the Custom Postback Tool.

Consult the documentation for your particular service to find the correct custom postback URL you should be using. 

 
1.    Get your Postback URL from the service you want ClickMagick to send the Postback to.
 
2.    Go to the Custom Postbacks tool in the Campaigns Tools menu and click on the “New Custom Postback” button.
 
3.    Choose the Campaigns parameters you want to trigger the custom postback, select the Conversion Type, and enter your service’s Postback URL, including any ClickMagick tokens to send back the information that you’re interested in. These tokens are described in the next section.
 
4.    When you send clicks to your Campaigns landing page using your UTM-powered link, you can also send a unique identifier that ClickMagick will return for you in your custom postback.  Simply pass the unique value in the cmd_tid parameter of your link:

https://yourlandingpage.com?cmc_tid=<unique_value>&utm_source=...

The unique value can be anything and is usually generated automatically for you by your traffic source—it will generally be a unique number or sometimes an email address. If you look up “postback” in the knowledge base of your traffic source, you should find instructions on how to generate this optional value.


Which ClickMagick tokens are available for use in the Custom Postback URL for Campaigns?

If you use any of the tokens below in a custom postback URL, they will be replaced with actual values when the custom postback request is sent. For example, [cmc_amt] would be replaced with the actual amount for a Campaigns sale.

For Campaigns, the following tokens are available:

[cmc_vid] [cmc_tid] [cmc_project] [cmc_ref] [cmc_amt]

[utm_source] [utm_medium] [utm_campaign] [utm_term] [utm_content]

[s1] [s2] [s3] [s4] [s5]

[gclid] [msclkid] [country] [timestamp]


The [cmc_tid] token returns the cmc_tid URL parameter value that was sent with the Campaigns click.

The [timestamp] token is replaced with the time of the conversion in UTC format: 2022-01-27 22:55:19+0000

The [cmc_vid] token is replaced with the Campaigns Visitor ID.

The [cmc_project] token returns the name of your Campaign Project.

The [s1] through [s5] tokens return the values in the s1 through s5 parameters in the postback URL. You can use these values to send special information from the postback URL to your custom postback URL.

The [cmc_ref] token returns the ref value of your Action, Engagement, or Sale Conversion.

The [cmc_amt] token returns the sale amount of your Sales Conversions.

The [utm_] tokens return the UTM parameters.

Can you show me an example?

With a Campaigns project, you will generally use the [cmc_tid] and [cmc_amt] tokens in your custom postbacks.

The [cmc_tid] token represents the Click ID or Transaction ID that was originally sent to ClickMagick by the original service (typically a traffic source), and the [cmc_amt] token represents the amount of a sale that was made.

For example, if you were using the MGID service and they told use you use this postback URL with their service when a sale is made...

https://a.mgid.com/postback?c=<transactionID>&r=<sale-amount>&e=golf82573

…you would replace <transactionID> and <sale-amount> with ClickMagick’s [cmc_tid] and [cmc_amt] tokens, like this:

https://a.mgid.com/postback?c=[cmc_tid]&r=[cmc_amt]&e=golf82573

You would use this modified custom postback URL when creating a custom postback in the Custom Postback Tool.

Consult the documentation for your particular service to find the correct custom postback URL you should be using. 

 
 
Note: ClickMagick can both send and receive postback requests. The “Custom Postbacks” talked about in this article are postbacks sent from ClickMagick to other services, whereas the Postback URL List and Postback Log tools are used to manage postbacks that are sent to ClickMagick from other services. To learn more about the differences between these two types of Postback, read this article:

What’s a Postback URL vs. a Custom Postback?


Article 217 Last updated: 06/08/2022 4:03:43 PM
https://www.clickmagick.com/kb/?article=217