How do I embed my referral program into my Thank You page?

Modified on Wed, 28 Jun, 2023 at 5:43 AM

Yes, this is possible! You'll need to start by creating a Custom Page campaign. 

Once you've done that, take note of the widget code on the Installation Instructions page - in particular, locate your store's "myshopify.com" URL and the campaign ID (this is the "cmp" parameter). Then go to Settings > Checkout > Additional Scripts in your Shopify dashboard and add the following:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script><script>

function conjuredReferralExternal(conjuredContainer) {

                if(typeof(Shopify) !== 'undefined') {

                    if(Shopify.checkout !== undefined && Shopify.checkout) {

                        if(Shopify.checkout.credit_card !== undefined && Shopify.checkout.credit_card) {

                            jQuery('#conjured_referral #conjured_referral_name').val(Shopify.checkout.credit_card.first_name + ' ' + Shopify.checkout.credit_card.last_name);

                        } else if(Shopify.checkout.shipping_address !== undefined && Shopify.checkout.shipping_address) {

                            jQuery('#conjured_referral #conjured_referral_name').val(Shopify.checkout.shipping_address.first_name + ' ' + Shopify.checkout.shipping_address.last_name);

                        }

                        jQuery('#conjured_referral #conjured_referral_email').val(Shopify.checkout.email);

                    }

                }

}

      Shopify.Checkout.OrderStatus.addContentBox(

        '<div id="conjured_referral"></div>'

      );

</script>

<script src="https://app.conjured.co/shopify/referral/widget.js?shop=YOURSTORE.myshopify.com&cmp=YOURCAMPAIGNID"></script>

Where you replace YOURSTORE with your myshopify.com domain and YOURCAMPAIGNID with the ID of your campaign. If you have any trouble with it, please don't hesitate to contact us at help@shopcircle.co- we'd be happy to do the implementation for you!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article