Skip to main content

Coupon Tracking With Recurring Subscriptions

Sasha Gerold avatar
Written by Sasha Gerold
Updated over 10 months ago

This guide focuses on tracking coupons specifically for recurring subscriptions.

General Flow for Coupon Tracking

Triggering Conversion: The conversion must be triggered at the moment we learn that the user has used a coupon.

Coupon Redeemed Conversion: This action will create a "couponredeemed" conversion.

Return CID: The request to redeem the coupon will return a CID, which you will need for further integration.

API Integration Using CID: After redeeming the coupon and obtaining the CID, the integration behaves like a standard API integration using the CID for tracking further actions.

Coupon Redeem Endpoint

Once a coupon is redeemed, you will use this endpoint to generate a CID and note that the coupon was redeemed in the system:

Coupon redeem will return the CID in the response, and it is necessary to save this.

Required Information:

couponCode: The coupon code that the user used.

status: Use the string "CONVERSION_STATUS_APPROVED".

conversionTypeCode: Use the fixed string “couponredeem” for this case.

(This conversion type must be created first as it is not included by default).

geoLocation: Can be the real country of the user in ISO3166 format or a placeholder like “US” if not available.

revenueOriginId: Fixed string that is present on the platform - LINK

Sale Conversion Endpoint

Once a charge occurs, you will use the same endpoint to create conversions in the system:

Required Information:

cid: The ID collected during the coupon redemption.

conversionTypeCode: Use the string “sale”.

amount.value: The charge amount as a string (e.g., “100.5”).

externalId: A unique ID identifying the transaction.

Optional fields include customerId and customParams.AdvS for saving additional information, though these are not mandatory.

Testing the Integration

To test the coupon tracking integration:

Create a Coupon: Ensure that the coupon exists on your platform and can be used for discounts.

Redeem the Coupon: Access the website without tracking parameters and enter the coupon.

Check Conversion Report: After redeeming, an informational conversion will be added to the Conversion report with the type "Coupon redeem". After payment, a conversion entry will also be added to reflect the transaction.

Did this answer your question?