All Collections
Integrations
Integrating with Cratejoy
Integrating with Cratejoy

Learn how to integrate Tapfiliate with Cratejoy.

Maria avatar
Written by Maria
Updated over a week ago

Integrating Tapfiliate with Cratejoy involves setting up an affiliate marketing program within your Cratejoy subscription box business.

To get started:

1. In your Cratejoy account, go to design > click code next to your theme > Select the base.html template

2. Add the following code just after the <body>tag at the top of the file:

<script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>

<script type="text/javascript">

(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){

(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');

tap('create', 'YOUR ACCOUNT ID', { integration: "cratejoy" });

tap('detect');

</script>


Don't forget to replace 'YOUR ACCOUNT ID' with your actual account ID, which can be found in your Tapfiliate account Profile settings.

3. Hit save

4. Next, find the thank_you.html template in the customer folder

5. Open account info, and select the component.html. To component.html, add the following code snippet:
<script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>

<script type="text/javascript">

(function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){

(t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');

tap('create', 'YOUR ACCOUNT ID', { integration: "cratejoy" });

{% if order.products|length == 1 %}

tap('conversion', '{{ order.id }}', {{ order.total }} / 100, {}, '{{ order.products[0].id }}');

{% else %}

tap('conversion', '{{ order.id }}', {{ order.total }} / 100);

{% endif %}

</script>

Make sure to replace YOUR ACCOUNT ID with your actual account id.

6. Hit save, and don't forget to test your integration before starting your program.

You can also check out our Cratejoy integration guide here or/and watch our video guide below.

Can I set up recurring commissions for affiliates?

If you want to reward your affiliates with commissions for recurring subscription payments made by customers they referred, you'll need to work with both Cratejoy's and Tapfiliate's APIs. Feel free to reach out to the support team if your team needs guidance with this.

Did this answer your question?