Knowledge Base      


How do I generate Campaign conversions with Postbacks or Webhooks?


If you’re an affiliate marketer working with major affiliate networks like ClickBank and MaxBounty, you’ll want to follow the affiliate marketing guide for this here:

How do I track affiliate sales using Postback URLs?


Otherwise, if you have a custom set up and you want to send conversions to ClickMagick Campaigns using a Postback or Webhook, it’s really simple to do. Here are your custom endpoint URLs:

 
Actions https://www.clkmg.com/api/a/post/?uid=[USERID]&s1=###&ref=###&timestamp=###
Engagements https://www.clkmg.com/api/e/post/?uid=[USERID]&s1=###&ref=###&timestamp=###
Sales https://www.clkmg.com/api/s/post/?uid=[USERID]&s1=###&ref=###&timestamp=###&amt=###







There’s just one required parameter, and five optional parameters you can provide ...

s1 – This required value should be the email address or Campaigns Visitor ID for the visitor. If you don’t have the email address, you can get the Visitor ID from the first-party cookie that ClickMagick sets on your domain, or via the [cmc_vid] token which is available on any page with Campaigns Click Tracking code.

ref – An optional “reference” value associated with the conversion.

amt – The optional amount for a sales conversion.

cmc_currency – An optional 3-character currency code e.g. USD to go with the amount. This isn’t normally needed as most users view their stats in ClickMagick in the currency their business receives money in, but if this value is provided the amount will be converted to the currency of your corresponding Campaigns Project.

cmc_cogs – An optional COGS amount to attach to a sale (sales only, obviously) e.g. 25.00

timestamp – Optional timestamp of the conversion, otherwise it defaults to “now”.

Timestamps can be in any of the following formats:
 
YYYYMMDDHHMMSS UTC 0
YYYY-MM-DD HH:MM:SS UTC 0
YYYY-MM-DD HH:MM:SSZ UTC 0
YYYY-MM-DD HH:MM:SS+HH:MM +HH:MM time zone
YYYY-MM-DD HH:MM:SS-HH:MM -HH:MM time zone
YYYY-MM-DDTHH:MM:SS UTC 0
YYYY-MM-DDTHH:MM:SSZ UTC 0
YYYY-MM-DDTHH:MM:SS+HH:MM +HH:MM time zone
YYYY-MM-DDTHH:MM:SS-HH:MM -HH:MM time zone


Article 793 Last updated: 07/10/2024 9:11:54 AM
https://www.clickmagick.com/kb/?article=793