Skip to main content
How to Implement Server Postback with Transaction ID
Simma Baghbanbashi avatar
Written by Simma Baghbanbashi
Updated over a week ago

💡 If you plan on using the same logic for all your Offers, we recommend using Global Server Postback. By using a global postback URL, you can set up conversion tracking for all your offers in Aspire using only one postback URL. See this article for directions.

Before continuing with this article, you should understand the fundamentals of server postback tracking. Below, we’ll focus on Server postback tracking with Transaction ID. For information on tracking with partner ID, see this article.

Step 1: Configure your Link Tracking Offer

You’ll first need to create a Link Tracking offer within your Sales Tracking dashboard in Aspire to obtain the postback URL snippet.

Directions:

  1. Go to Reporting > Sales Tracking.

  2. Click “Add Offer”, then select “Link Tracking Offer” from the drop-down menu.

  3. Enter an Offer Name, Offer Description, Conversion Type, and Payout Option.

  4. Set the Conversion Tracking protocol to Server Postback w/ Transaction ID.

  5. In the Offer URL tracking, enter the landing page where you want to redirect traffic.

    The URL will need to include the variable {transaction_id} and your store’s parameter for transaction ID. The query parameter name is going to depend on your implementation. Please confirm what the query parameter will be with the engineer implementing this.

    Basically, we need a way to pass this variable to your store - usually, this is done as a URL query parameter. For example, your offer URL could look like this: https://yourstore.com?transaction_id={transaction_id}

Step 2: Store the Session Identifier

Your store will need to be able to accept the transaction_id as a query parameter.

Whenever a customer clicks on an affiliate’s link, we will redirect to the Offer URL and replace {transaction_id} with the actual unique transaction ID.

For the example above, it would look something like https://yourstore.com?transaction_id=102656693ac3ca6e0cdafbfe89ab99.

Your store will then need to handle recording the transaction_id and storing it for that potential customer. Because it depends on your software, this is the most varied step in the process. The most common way is to store the transaction ID as a variable in your e-commerce site.

💡 Important: If you have multiple domains (i.e. store.us and store.ca), you need to ensure the transaction ID persists across both stores if the user changes stores.

Step 3: Return ID upon Conversion

When the customer converts, your store will need to make a GET HTTP request to the postback URL and include the transaction ID for that session and the conversion amount.

For example, if the postback URL is

https://aspireiq.go2cloud.org/aff_lsr?offer_id=1&amount=AMOUNT&transaction_id=TRANSACTION_ID&adv_unique1=ORDER_ID

The final URL would end up looking something like this:

https://aspireiq.go2cloud.org/aff_lsr?offer_id=1&amount=25&transaction_id=102656693ac3ca6e0cdafbfe89ab99&adv_unique1=547839

You can see what the postback URL to call is by clicking on “Instructions” on your Offer page within Sales Tracking.

💡 Important: You will need to edit TRANSACTION_ID, AMOUNT, and ORDER_ID to match the variables you are using on your website to store these values.

Once the postback is implemented, we highly recommend placing a test order to confirm whether all the macros and parameters are placed successfully in the right position. See this article on how to test your postback.

Did this answer your question?