All Collections
Available Integrations
Stripe Integration via Payment Links
Stripe Integration via Payment Links
David Rolenc avatar
Written by David Rolenc
Updated over a week ago

Integrating Stripe via payment links is a quick way to set up your affiliate program for your landing pages. After setup, Trackdesk automatically tracks all conversions from your Customers. Conversions are automatically updated for billing events refund and cancellation.

Integration steps

  1. Install Trackdesk app
    Our Stripe app is available here in the Stripe marketplace -

  2. Fill in all necessary information to the settings of the Stripe app and Save changes.

    1. Tenant ID - your Tenant ID can be found at the bottom of the Settings page

    2. Personal token - personal tokens can be found at the bottom of the Settings page, or a new one can be created via the Personal tokens menu in the Settings

  3. Set up tracking of clicks
    ​Track clicks by including the following code on every page of your website where you want to track clicks, including all landing pages added to this offer. For best results, position the code as high as possible within the <head> tag of your HTML document.

    <!-- Trackdesk tracker begin -->
    <script async src="//"></script> <script>

    trackdesk('YOUR TENANT ID', 'click');
    <!-- Trackdesk tracker end -->

    Make sure to replace YOUR TENANT ID with your actual tenant ID.

  4. Set up the addition of CID to payment links.

    Add the following snippet to all pages where payment links are located. Add the snippet ideally at the end of the <body> tag.

    <!-- Trackdesk set client_reference_id help fuction begin -->
    (function () {
    var cookie = document.cookie.match('(^|;)\\s*trakdesk_cid\\s*=\\s*([^;]+)');
    if (Array.isArray(cookie)) {
    try {
    var trakdeskCid = JSON.parse(cookie.pop());
    var cid = trakdeskCid['cid'];
    document.querySelectorAll('a[href^=""]').forEach(function (a) {
    var url = new URL(a.href);
    url.searchParams.set('client_reference_id', cid);
    a.href = url.href;
    } catch (e) {
    <!-- Trackdesk set client_reference_id help fuction end -->

Testing Your Integration

Note that our Stripe app works only for Stripe live mode (not for Stripe test mode).

Note that our Stripe app automatically checks for new conversions once an hour. In order to speed this up, you can do a manual check in the settings of our Stripe app by using the Check Now button.

Please remember to test the creation of click and conversion before starting your program. This way, you can verify that tracking has been set up correctly. You can create a test click and conversion by following the steps described here.

Did this answer your question?