You can connect your custom form to Viral Loops and automatically add participants to your referral program—without being limited to our default Form Widget. This is perfect if you already have a form built into your website or want more control over design and fields.
💡 Tip: Want to skip the technical setup?
Our Concierge Service can do this for you—saving time and ensuring everything works perfectly from day one.
Step 1: Choose Your Scenario
Decide how you want your custom form to work with Viral Loops:
Custom Form → Viral Loops Participation (Only)
When someone submits your form, they are automatically added to your Viral Loops campaign.
(Complete Step 2 only)Custom Form → Viral Loops Participation + Instant Sharing State
After they submit your form, they’re added to your campaign and immediately see their Sharing State (referral link, stats, sharing options).
(Complete Step 2 + Step 3)Custom Form → Viral Loops Participation + Redirect to Another URL
After submission, they’re added to your campaign and redirected to a page of your choice (which can also display their Sharing State).
(Complete Step 2 + Step 3)
Step 2: Choose Your Implementation Method
You have three options to connect your form to Viral Loops:
A. No-Code Installation (Easiest)
Go to Edit Campaign → Installation Step in your Viral Loops dashboard.
Select No-Code Installation.
Copy the provided script snippet and paste it inside the
<head>
tag of the page where your custom form is located.Follow the on-screen instructions.
B. Front-End Integration (SDK Script)
Add your Viral Loops JavaScript Snippet to your website. You can find it in the Installation Step by selecting I’ll do it myself.
Create your custom form and map its fields to Viral Loops’ attributes (or use your own).
📄 SDK Documentation
C. Back-End Integration (API Calls)
Use our Web API to register participants via the
POST /campaign/participant
method.
📄 API DocumentationIf redirecting users to a Sharing State page, ensure the Viral Loops snippet and widget JS are installed there.
📄 Automatic Participation Guide
Step 3: Showing the Sharing State or Redirecting
If you chose Scenario 2 or 3 in Step 1:
Option A: Show Sharing State Immediately (programmatically)
Copy the code snippet from the location here and replace the Campaign ID with the one found in your Installation step of the Campaign wizard.
Pass the participant’s email into the snippet to load their data. Check our campaign identification methods to do this programmatically.
If you want to show the sharing state on the same page of the form, we suggest installing the form widget and hiding it until the form is submitted.
Option B: Redirect to a Sharing Page
Add a URL parameter to your form’s Submit button so users are redirected to the Sharing State page after joining.
Follow the instructions in the Automatic Participation Guide.
GDPR Consent (Optional)
If you collect GDPR consent:
Add the
consents
property to the participant object when sending their data to Viral Loops.The Consent ID is available in your campaign’s Settings under GDPR consents.
Important Notes
Even if you skip the Form Widget for participation, we recommend placing it somewhere else on your site so participants can access their referral link anytime.
This guide is intended for custom-built websites. Some landing page builders (e.g., Squarespace, Wix) may have limitations.
Extra Resources