Cratejoy is a subscription platform that acts as a marketplace. Here are the steps on how to integrate your Refersion account with Cratejoy. 

Part 1: Obtaining you tracking pixel from Refersion

Step 1

Make sure you are logged into your Refersion account and click the Account dropdown button. The image below illustrates the first four steps. 

Step 2

Click the Settings link under the account dropdown. 

Step 3

Click the Tracking link in the menu on the left side. 

Step 4

This should bring up your Tracking page. You want to click the Add Tracking button. 

Step 5

Click the tracking setup documentation link. This will take you to the page that will display your tracking code. 

Step 6

Copy your tracking code. Everything in the black box. 

Part 2: Insert The Tracking Pixel Into Your Website

There are two ways to do this. If you are using a custom domain (, then go to step 1a. If you are using a page, then go to step 1b. 

Step 1a (For Custom Domains)

You must insert your tracking pixel that you copied from step 6 in your <header> section. Alternatively, you might be able to insert it in your header template file for your website. Please contact your website admin or host for instructions on editing your header file. You're done skip down to the next section. 

Step 1b (For Cratejoy page)

If you are using the cratejoy page, then you can insert the tracking pixel into your template directly. First, click the Design in the sidebar menu. 

Step 2b

Click Designer

Step 3b

Click SEO Settings

Step 4b

Click Site Settings

Step 5b

Make sure E-Commerce Tracking is turned on. Now add your tracking pixel code copied from step 6 to the footer code box. 

Part 3: Insert Cart Pixel

Next, insert the cart pixel. 

Step 1

From the main Cratejoy sidebar menu, click “Design” and then “Code”.

Step 2

Navigate down to components / customer / thank_you / Customer Thank You Content / component.html:

Step 3

Insert the following code  –

<script src="//"></script>  
      'order_id':  '{{ }}',
      'shipping':  '{{ order.total_shipping /  100  }}',                     'tax':  '{{ order.total_tax /  100  }}',

   {%  if |  length  >  0  %}                                 {%  for  coupon  in %}                                      'discount':  '{{ coupon.discount_value  /  100  }}',  
         'discount_code':  '{{ coupon.code_used }}',                         {%  endfor  %}                  
   {%  endif  %}                                    
   'currency_code':  'USD'  
      'first_name':  '{{ customer.first_name }}',  
      'last_name':  '{{ customer.last_name }}',  
      'email':  '{{ }}'  
   {%  if order.products |  length  >  0  %}              
   {%  for  product  in order.products %}              
      'sku':  '{{ }}',                      
      'quantity':  '{{ product.quantity }}',                      
      'price':  '{{ product.price /  100  }}'              
   {%  endfor  %}  
   {%  endif  %}    

You MUST replace the YOUR-PUBLIC-KEY with the merchant’s actual public key (from step 2, above). If the merchant is NOT using USD as their currency, you MUST also replace the ‘currency code’ with the proper value.

Part 4 Time To Test

 Step 1

Create yourself a 100% off/free shipping code (Cratejoy can have one code do both) under the “Coupons” area of the Cratejoy sidebar menu and run through a test order from your Refersion account.  

Step 2

Especially if the site is using a private domain, insure the tracking pixel is firing correctly using examination of the local storage – be mindful of subdomains and/or domain permutations (and whitelist as needed) to ensure the RFSN parameter passes through to checkout.

Step 3

For checkout, although a zero value order will report without a problem, you will need to have a credit card handy.  Once the order is placed, it should report in shortly and you should be good to go!

Part 5: You're Done!

Congratulations, your Refersion account should be hooked up to Cratejoy. 

Did this answer your question?