Skip to main content

Shopify Raffle Tickets Setup

Written by Rafael Felsemburg
Updated over 2 weeks ago

Our Purchases App for Shopify allows you to generate raffle tickets when customers purchase qualifying products. After checkout, customers can view their raffle ticket numbers on the order confirmation page and within their account.

If you already created your promotion and only need installation instructions, you can skip to Step 8.


Requirements

Before setting up a Shopify raffle promotion, make sure:

  • You are using Shopify

  • All products and variants have unique SKUs

Each variant must have a unique SKU so ViralSweep can correctly generate and assign raffle tickets.


Step 1: Create the Promotion

  1. Create a new promotion in ViralSweep

  2. Select Purchases → Shopify


Step 2: Connect Your Shopify Store

If your Shopify store is already connected, it will appear at the top of the screen.

If it is not connected, connect your store first.

Once connected:

  1. Click Update Products

  2. Select Import Products and All Variants

Your products and variants will now appear in the product list on the right.


Step 3: Select Qualifying Products

Choose which products or variants qualify for raffle tickets.

If you're running multiple raffles at once, the system can assign different raffle tickets for each purchased item.


Step 4: Set Raffle Ticket Amounts

Next to each qualifying product or variant, click the ticket icon.

Enter how many raffle tickets a customer receives when purchasing that item.

Tip:
To avoid confusion, we recommend naming your Shopify variants or SKUs based on the number of raffle tickets they provide.

Example:

  • Variant: 10 Tickets

  • Variant: 25 Tickets


Step 5: Configure Promotion Settings

Set the following promotion details:

  • Promotion Title

  • Start and End Dates

  • Number of Winners

  • Enable Raffle Tickets

  • Enter your Store URL


Step 6: Configure Entry Settings

Since raffle tickets are used instead of entries:

Set Entries Awarded Per $1 Spent to:

0 entries

This ensures customers receive raffle tickets only, not additional entries.

Non-Qualifying Orders

If a customer purchases an item that does not qualify, the widget will notify them on the order confirmation page that their order did not qualify for the promotion.


Step 7: Customize the Widget

Before saving the promotion, you can also configure:

  • Widget images

  • Official rules

  • Geo-targeting by country

  • Widget design and styling

  • Email notifications informing customers how many tickets they earned

Once everything is configured, click Done to save the promotion.


Step 8: Install the Promotion (Old Order Status Page)

If your store still uses the old Shopify Order Status Page, follow these steps.

Go to the Install tab in ViralSweep and copy the code under:

Step 1: Install to Checkout & Accounts

Then in Shopify go to:

Settings → Checkout → Order Status Page

Paste the code and save.

If your store uses the new checkout experience, skip this step and continue to Step 9.


Step 9: Install Using Shopify App Embeds (New Checkout)

In Shopify:

  1. Go to Online Store → Themes

  2. Click Customize

  3. Select Checkout and Customer Accounts

  4. Click Apps on the left side

  5. Add the widget to:

    • Thank You Page

    • Order Status Page

Enter the Promotion ID from ViralSweep.

Example:

promotion-123456

Enter only:

123456


Step 10: Show Tickets Inside Customer Accounts (Optional)

If your store uses customer accounts and you'd like users to see their raffle tickets after logging in:

Go to:

Online Store → Themes → ... → Edit Code

Open one of these files:

  • customers/account.liquid

  • sections/main-account.liquid

Paste the ViralSweep code at the bottom of the file and click Save.

If you do not need this feature, skip to Step 11.


Step 11: Install Theme Script

Return to the Install tab in ViralSweep.

Copy the code under:

Step 2: Install to Theme

Then in Shopify go to:

Online Store → Themes → ... → Edit Code

Open:

theme.liquid

Paste the code before the closing </head> tag and save.


Step 12: Test the Setup

Your installation is complete.

To test:

  1. Make a purchase on your store

  2. Visit the order confirmation page

You should see the raffle ticket widget displaying the ticket numbers earned for that purchase.

If customer accounts were installed, users can also log into their account to see their raffle ticket numbers there.


Troubleshooting

The widget is not appearing on the order confirmation page

Check the following:

  • The promotion is active

  • The promotion ID was entered correctly

  • The widget was added to both the Thank You page and Order Status page

  • Your Shopify checkout is using the correct installation method


Raffle tickets were not generated after a purchase

This usually happens when:

  • The product does not have a SKU

  • The SKU does not match the product in ViralSweep

  • The purchased variant was not selected as a qualifying product


Orders show as non-qualifying

This means the product purchased was not included in the raffle configuration.

Update the promotion and ensure the product or variant is selected.



Legal Disclaimer

ViralSweep provides this feature to allow you to run purchase-based sweepstakes and raffles. Laws governing these promotions vary by state and country.

ViralSweep does not assume responsibility for legal compliance.

You are responsible for ensuring your promotion complies with all applicable laws, including offering a free alternate method of entry where required.

If you need help with legal compliance for promotions in the United States or Canada, please contact us.


Need Help?

If you need assistance with setup or installation, our team can help.

Click the chat icon in the lower-right corner to start a conversation with support.

Did this answer your question?