How can I trigger a referral on a double opt-in email?

If you are using a Signup Event as your referral trigger and want to only count a referral when your new subscriber opts in, there are a few ways to accomplish this:

Option 1: Use a Redirect URL

In Campaign Editor > 5. Installation, choose the automagic detection method for adding new participants. When adding URLs, make sure to add a Redirect URL. This Redirect URL should be your double opt-in "thank you" page.

When setting up automagic detection, make sure to ignore any forms and only track input fields instead. This way, when a referred person submits their email address, they are not yet added as a participant until they visit the Redirect URL.

GrowSurf will trigger a referral on this Redirect URL page, and automatically attribute a referrer (if there is one) from the initial visit.

Option 2: Use JavaScript

You can use the JavaScript Web API method growsurf.triggerReferral('[email protected]') to trigger the referral on your double opt-in "thank-you" page. The bare minimum requirement would be to pass in the email address [email protected] because GrowSurf will detect if the person was referred via a stored browser cookie.

In the example above, please make sure to replace [email protected] with the actual new subscriber's email address.


Alternatively, you can use a Custom Event referral trigger for your double opt-in process.

In Campaign Editor > 5. Installation, you'll want to update your referral trigger to be Custom Event, then follow the new installation instructions, which will have been updated accordingly.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.