Integrating with Moonclerk

This guide includes two seperate integrations: integrating with MoonClerk for one-off payments, and integrating with MoonClerk for recurring commissions. Depending on your use case, you should only follow one of the guides below.

Note: if you use Moonclerk in combination with Squarespace, please check also the Squarespace integration guide.

Integration to track one-off payments

Follow this guide only if you are integrating with MoonClerk to track one-time purcases.

  1. Add the following code right after the opening <body> tag of all pages of your website:

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
        function getQueryParams(){var r={},n=function(r){return decodeURIComponent(r.replace(/\+/g," "))},t=location.search.substring(1).split("&");for(var e in t){var o=t[e].toString().split("=");o.length>1&&(r[n(o[0])]=n(o[1]))}return r}
      
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
    
        var params = getQueryParams();
        tap('create', '((((YOUR ACCOUNT ID))))');
        tap('detect')
        if (params.payment_id) {
          var amount = params.amount ? params.amount / 100 : 0;
          tap('conversion', params.payment_id, amount);
        }
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  2. Create a thank you/success page in the platform that hosts your website (eg. Squarespace).

  3. In the MoonClerk payment form, scroll down to Confirmation and select Redirect to another webpage.

  4. Add the URL of the thank you/success page you created in the platform that hosts your website (eg. Squarespace), where users will be taken after payment, eg. http://your-site.com/success and append ?payment_id={{payment_id}}&amount={{amount}} to this link. It should now look like http://your-site.com/success?payment_id={{payment_id}}&amount={{amount}}

Integration to track recurring commissions

Follow this guide only if you are integrating with MoonClerk to track recurring commissions.

  1. Add the following code right after the opening <body> tag of all pages of your website:

    <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
    <script type="text/javascript">
          function getQueryParams(){var r={},n=function(r){return decodeURIComponent(r.replace(/\+/g," "))},t=location.search.substring(1).split("&");for(var e in t){var o=t[e].toString().split("=");o.length>1&&(r[n(o[0])]=n(o[1]))}return r}
      
        (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
        (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');
        
        var params = getQueryParams();
        tap('create', '((((YOUR ACCOUNT ID))))');
        tap('detect')
        if (params.customer_id) {
          tap('conversion', params.customer_id,  0);
        }
    </script>
    

    {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

  2. Create a thank you/success page in the platform that hosts your website (eg. Squarespace).

  3. In the MoonClerk payment form, scroll down to Confirmation and select Redirect to another webpage.

  4. Add the URL of the thank you/success page you created in the platform that hosts your website (eg. Squarespace), where users will be taken after payment, eg. http://your-site.com/success and append ?customer_id={{customer_id}} to this link. It should now look like http://your-site.com/success?customer_id={{customer_id}}

Recurring commissions

You can use the API or Zapier to set up recurring commissions. In case you have not heard of Zapier: Zapier is the swiss army knife of the web. Is a setup too technical for you? Or is a repetitive tasks costing you too much time to do manually? Zapier allows you to easily integrate Tapfiliate with more than 500 web-apps.

You can use the following Zap to setup recurring commissions with just a couple of clicks:

Do note that you will need a Zapier plan that supports multi-step Zaps.

Important

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

Start a 14-day free trial with all our features enabled

Start now