Skip to main content
All CollectionsCampaign: Optimizing & CustomizingOther Platform Widgets
Embedding the post-purchase popup widget on Cratejoy
Embedding the post-purchase popup widget on Cratejoy

Add the post-purchase popup widget to your CrateJoy store

Adam avatar
Written by Adam
Updated this week

If you're a merchant using Cratejoy, you can embed the post-purchase popup widget in your theme to encourage customers to join your referral or affiliate program on the "Thank You" page at checkout.


Embed the post-purchase popup widget

Step 1: Copy the code snippet

  1. On the ReferralCandy dashboard, go to Campaigns > Select your campaign.

  2. Go to Widgets.

  3. Toggle the Post-Purchase Popup widget on.

  4. Check Allow signup/waitlist for unqualified customers. Learn more

  5. Click Save Changes.

  6. Copy the code snippet.

Step 2: Add the code to your theme

  1. On your Cratejoy dashboard, go to the Design tab and click Code.

  2. Navigate to components > customer > thank_you > Customer Thank You Content > component.html.

  3. Paste the code after the integration code </script>.

  4. Replace the following with:

    • data-fname=”John” with data-fname={{ order.customer.first_name }}

    • data-lname=”Smith” with data-lname={{ order.customer.last_name }}

    • data-email=”......” with data-email={{ order.customer.email }}

Step 3: Test the post-purchase popup

To ensure that the popup widget is working in Cratejoy:

  1. Make a test purchase at your store.

  2. The popup widget should appear on the "Thank You" page.

  3. The referral link in the popup should be generated based on the first and last name used during checkout. For example, yourstore.refr.cc/campaign/u/johnsmith.


💬 Need help? Click the chat widget on the right to start a conversation. Learn more


Did this answer your question?