This setup allows customers to see the raffle ticket numbers they’ve earned after completing a purchase—both on the order confirmation page and within their account.
Already created your promotion? Skip to Step 9 for installation.
Requirements
Before you begin, make sure:
You’re using WooCommerce
All products and variants have unique SKUs
⚠️ If your variants don’t have SKUs, you must add them. Raffle tickets rely on SKUs to generate correctly.
Step 1: Create a promotion
In ViralSweep, create a new promotion
Select Purchases → WooCommerce
Step 2: Connect your store
If your store is already connected, it will appear at the top. Otherwise:
Get your store URL
Go to: WordPress → Settings → General
Copy the Site Address (URL)
Generate API keys
Go to: WooCommerce → Settings → Advanced → REST API
Click Add Key
Enter:
Description:
ViralSweepPermissions: Read/Write
Click Generate API Key
Copy the Consumer Key and Consumer Secret
Paste these into ViralSweep to connect your store.
Step 3: Import your products
Click Update Products
Select 'Yes Proceed"
Your products and variants will appear on the right-hand side.
Step 4: Select qualifying products
Choose which products or variants apply to the raffle.
Only selected items will award raffle tickets
Non-selected products will not qualify
💡 If running multiple raffles, tickets can be assigned per product.
Step 5: Assign raffle tickets
For each qualifying product:
Click the ticket icon next to the item
Enter how many raffle tickets the purchase should award
💡 Tip: Name your SKUs or variants based on ticket quantity to keep things clear.
Step 6: Configure promotion settings
Add a promotion title
Set start and end dates
Choose the number of winners
Enable Raffle Tickets
Enter your Store URL
Step 7: Adjust entry settings
Since you’re using raffle tickets:
Set entries to 0 per $1 spent
This ensures users only receive raffle tickets—not standard entries.
If enabled, the widget will notify users when an order doesn’t qualify.
Step 8: Customize the widget
Upload images
Add your official rules
(Optional) Geo-target by country
Adjust widget styles in Design
Enable email notifications to send ticket numbers
Click Done to save your promotion.
Step 9: Install the widget (Checkout page)
We offer free installation. If you’d like help, invite [email protected] with editor access.
To install manually:
Go to the Install tab in ViralSweep
Copy the code under Step 1: Install to Checkout
Step 10: Add code to the order confirmation page
In WordPress, go to:
Tools → Plugin File EditorSelect WooCommerce
Open:
templates > checkout > thankyou.php
Paste the widget code below:
“Thank you. Your order has been received”
💡 Placement may vary depending on your theme.
Step 11: Add global widget script
Copy code from:
Step 2: Install to ThemeIn WordPress, go to:
Tools → Theme File EditorOpen:
Parts > Footer.htmlPaste the code at the top and save
Step 12: (Optional) Add to account page
If your store uses customer accounts:
Copy code from:
Step 3: Install to Account PageGo to:
Tools → Plugin File EditorSelect WooCommerce
Open:
templates > myaccount > dashboard.php
Paste the code below the “Hello” message.
Step 13: Test your setup
Place a test order
Confirm raffle tickets appear on the order confirmation page
Log into the customer account (if enabled) to verify tickets display correctly
Legal disclaimer
ViralSweep allows purchase-based sweepstakes and raffles, but laws vary by region.
You are responsible for ensuring compliance, including:
Local laws and regulations
Providing a free alternative method of entry, where required
For help with compliance in the U.S. or Canada, contact ViralSweep.
