When a new visitor submits a form on my site, can I only add them as a new participant if they were referred?

When someone visits your site (either directly or via referral link), GrowSurf needs to capture their email into your campaign by adding them as a new participant. If they were referred, GrowSurf associates them with their referrer, and their referrer will immediately receive credit.

This means that for every person who submits your site's form, they will be added as a new participant (and not just the people who followed a unique link from a referrer).

To prevent this behavior, and only allow people who were referred to be added as new participants, you will need to use the GrowSurf JavaScript Web API for adding new participants. Follow the steps below:

  1. In the Campaign Editor > Installation > Choose how to add participants to your campaign step, select Programmatically using the GrowSurf API
  2. Use the growsurf.getReferrerId() method to detect if a visitor used a unique referral link to visit your webpage.
    1. If the method returns a value:
      1. If your referral trigger is Signup Event, then call growsurf.triggerReferral(). This will add the participant and trigger the referral, and the referrer will receive credit.
      2. If your referral trigger is Custom Event, then call growsurf.addParticipant(). This will add the participant and associate the referrer to the new participant.
    2. If the method returns null, then do nothing
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.