Why do new participants get added only sometimes, or not at all, when using automagic form detection?
If you have " Automagically when someone submits a form on my site" selected as your campaign (see image) method of adding new participants, and you have selected forms and/or all inputs to track on your webpage, these are some common reasons why you may experience issues:
- Your webpage <form> is valid, but your webpage is adding additional JavaScript that affects the behavior of the form submission, which will cause issues with GrowSurf automatically adding a new participant.
- For example, on some forms hosted on the platform Tilda.cc or on embedded Klaviyo forms, the platform adds a preventDefault(), which will result in new participants not being added. To resolve this, your form should follow standard <form> protocol to ensure that there is no obtrusive JavaScript that affects the automatic form submission.
- If your webpage <form> is valid but uses AJAX to submit the form request (instead of a standard HTML post method).
- This can be identified if you inspect your <form> code and either of the following is true:
- The <form> element it is lacking an action attribute OR If there is no formaction attribute on a <button>, <input type="submit"> or <input type="image"> element
- The <form> element lacks a submit event (you may have to inspect any JavaScript for potential event listeners on your form. If you have an event listener, that means your form has a submit event).
- You can read more details on valid HTML forms here.
- This can be identified if you inspect your <form> code and either of the following is true:
- If your form redirects the person to a different webpage upon successful submission, please make sure of the following:
- You need to tell GrowSurf about this Redirect URL. Please go to the installation step in the campaign editor, and add the Redirect URL (see screenshot).
- Make sure that the redirect URL has the same-origin, otherwise this may cause issues with GrowSurf automatically adding a new participant.
- For example, if your form is on https://yoursite.com, having the form redirect to https://yoursite.com/success will work, but redirecting to https://anothersite.com will result in no participant being added.
- You may have the GrowSurf Universal Code installed twice on a single webpage. Please ensure that your Share URL, Signup URL, and/or Redirect URL only has one instance of the GrowSurf Universal Code.
- You may have checked the box for 'Only add new participants if they were referred' which means non-referred participants will not be added to your campaign (more details here).
- There may also be a strong possibility that your campaign's anti-fraud settings are preventing new participants from being added, if set to Strict Anti-Fraud (more details here).
In the case that new participants are not consistently being added, we recommend that you use the JavaScript method growsurf.addParticipant() for adding new participants.