How can I test in a sandbox or development environment?

If you are looking for a way to run your referral program in a "sandbox" environment before going live, you can accomplish this by creating two GrowSurf campaigns: One for "development", and the other for "production".

You can create a new campaign by going to your dashboard and clicking New Campaign in the the top-left campaign menu dropdown.

Every GrowSurf campaign has a unique ID that you can find in the URL or from your installation instruction's campaign-specific GrowSurf Universal Code.

This way, you can keep your test/development participants separate from your actual customers/participants and test your integrations (e.g, different webhooks, rewards) before going live with your referral program.

Here's an example of implementing the GrowSurf Universal Code to support environments for staging and production:

<script type="text/javascript">
   const STAGING = 'xyz789'; // Replace 'xyz789' with your staging campaign ID
   const PRODUCTION = 'abc123'; // Replace 'abc123' with your production campaign ID
   const CAMPAIGN_ID = (STAGING || PRODUCTION);

   // Call the GrowSurf Universal Code
   (function(g,r,s,f){g.grsfSettings={campaignId:CAMPAIGN_ID,version:"2.0.0"};s=r.getElementsByTagName("head")[0];f=r.createElement("script");f.async=1;f.src="https://app.growsurf.com/growsurf.js"+"?v="+g.grsfSettings.version;f.setAttribute("grsf-campaign", g.grsfSettings.campaignId);!g.grsfInit?s.appendChild(f):"";})(window,document);
</script>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.