The Tracking Scripts feature allows you to add third-party tracking and conversion scripts to your campaign pages. This helps you track pageviews, clicks, and conversions from your marketing efforts.
Availability: This feature is only available on the Business plan and higher.
Important limitations
⚠️ Browser tracking restrictions
Browsers like Safari and Firefox block third-party cookies by default, which may prevent some tracking scripts from working as expected.
If you’re using a ViralSweep-hosted page, this feature will work as intended
If you’re embedding ViralSweep on your own website, we recommend adding tracking scripts directly to your site instead (see below)
⚠️ Shopify limitation
Tracking scripts only work outside of Shopify’s platform. Due to recent updates, custom scripts are no longer supported on Shopify’s thank you page.
How tracking scripts work
You can add scripts to two stages of your campaign:
Pre-entry scripts
Fire when a user lands on your campaign page
Trigger once the ViralSweep form fully loads
Post-entry scripts
Fire only after a user successfully submits the entry form
Do not trigger if the user doesn’t complete the form
How to add tracking scripts
Go to your campaign editor
Locate the Tracking Scripts section
Paste your script into either:
Pre-entry tracking box, or
Post-entry tracking box
To add multiple scripts, place each one on a new line
Passing data into your scripts
You can dynamically pass user data into your tracking scripts using the following parameters:
[EMAIL]
[FIRST_NAME]
[LAST_NAME]
[ADDRESS]
[CITY]
[STATE]
[ZIP]
[COUNTRY]
[PHONE]
Custom fields
To pass custom field data:
Add the custom field to your entry form
Open your form in a browser
Right-click the field and select Inspect
Locate the field’s ID
Then use the ID like this:
[83520_1653480537]
Example use case
If you’re running Google Ads:
Create a conversion tracking tag in your Google Ads account
Copy the tag
Paste it into the Tracking Scripts section in ViralSweep
This allows you to track:
Campaign pageviews (pre-entry)
Form submissions (post-entry conversions)
Using tracking scripts on your own website (recommended for embeds)
If you’re embedding ViralSweep on your website, tracking scripts should be added directly to your site—not inside ViralSweep.
Setup overview
Create two pages on your site:
Page A: Entry page
Page B: Thank you page
Embed the ViralSweep form on both pages
In ViralSweep:
Go to Edit → Advanced → Redirect Upon Entry
Enable the setting
Set the redirect URL to Page B
Add your tracking scripts directly to your website:
Page A → pageview tracking
Page B → conversion tracking
How it works
When a user lands on Page A → your pageview script fires
After form submission → user is redirected to Page B
Page B loads → your conversion script fires
The ViralSweep post-entry experience will still display on Page B
Need help?
If you need assistance setting up tracking scripts or troubleshooting tracking issues, our team is here to help.
Click the chat icon in the bottom-right corner to start a conversation with support.
