How to integrate OneSignal with Shopify to boost ecommerce sales

If you run a Shopify store, you know the grind: attracting visitors is hard enough, but getting them to actually buy (and come back) is a whole other challenge. That’s where web push notifications come in—they can nudge people who bounced or forgot what was in their cart. If you want to set up web push notifications that don’t feel spammy, and you’ve heard about OneSignal, this guide is for you.

Below, I’ll walk you through connecting OneSignal to Shopify, what you can realistically expect, and some honest advice on what’s worth your time (and what isn’t).


Why Bother With Web Push Notifications?

Let’s be real: email is crowded, ads are expensive, and most people ignore the pop-ups. Web push notifications—those little messages that slide in on your browser—are easy to set up and have a pretty good shot at grabbing attention when used carefully.

But they’re not magic. Set your expectations:

  • Great for: Recovering abandoned carts, announcing flash sales, and reminding past customers you exist.
  • Meh for: Cold traffic that never opted in, or pushing generic “brand awareness” stuff.
  • Annoying if: You overdo it. Less is more.

Step 1: Get the Basics Set Up

Before you dive in, you need:

  • An active Shopify store
  • Access to your Shopify admin (with permissions to edit themes and install scripts)
  • A free or paid OneSignal account

No coding background? You’ll still need to copy-paste a snippet, but you don’t have to write any code from scratch.


Step 2: Create Your OneSignal Account and Set Up an App

  1. Sign up at OneSignal: Go to their site and set up an account. The free plan is enough to start.
  2. Create a new OneSignal app: Think of this as a workspace for your Shopify store.
  3. Choose “Web Push” as your platform: Skip the mobile options unless you’re building an app, too.
  4. Configure basic settings:
    • Site name: Whatever your store is called.
    • Site URL: Use your live Shopify store link (e.g., https://yourstore.myshopify.com or your custom domain).

Pro tip: Don’t use a staging or test domain unless you’re just experimenting—OneSignal tracks users by domain.


Step 3: Grab Your Integration Code

  1. On OneSignal, select “Typical Site” setup: This gives you a JavaScript snippet.
  2. Copy the code: It’ll look something like this:

    html

  3. Keep this tab open—you’ll need it in a second.


Step 4: Add OneSignal to Your Shopify Theme

Here’s where most guides get vague. Let’s be specific:

  1. In Shopify admin, go to “Online Store” → “Themes.”
  2. Find your live theme and click “Actions” → “Edit code.”
  3. Locate your theme’s theme.liquid file: You’ll find it under “Layout.”
  4. Paste the OneSignal code right before the closing </head> tag.

    • This makes sure the notification prompt loads on every page.
  5. Click “Save.”

Heads up: If you use a Shopify theme that updates automatically, you might lose your changes during an update. Make a note somewhere to re-add this code if you switch themes.


Step 5: Verify the Integration

  • Go to your live store in an incognito window (so you’re not logged in).
  • You should see a browser prompt like “This site wants to show notifications.”
  • If you don’t see it, clear your cookies or try another browser.

If it’s not working: - Double-check you pasted the snippet in the right spot. - Make sure your browser isn’t blocking notifications. - Confirm your site URL in OneSignal matches the actual Shopify domain.


Step 6: Customize the Opt-In Prompt

The default browser pop-up is… basic. OneSignal lets you add a “bell” widget or a custom prompt. Here’s how to make it less annoying:

  1. In OneSignal, go to your app settings → Prompt Settings & Subscription Bell.
  2. Toggle on the Subscription Bell (optional but recommended). You can change the icon, color, and text.
  3. Customize the welcome message so it says something actually useful (“Get sale alerts and restock updates—not spam.”).
  4. Preview in your store to make sure it doesn’t block navigation or look sketchy.

What to ignore: Don’t bother with every advanced prompt setting right now. Start simple.


Step 7: Set Up Your First Automated Push

Now for the good stuff—actually sending notifications that drive sales.

Recover Abandoned Carts

OneSignal doesn’t natively “see” Shopify carts, but you can work around this with a little effort.

The honest version: If you want true abandoned cart recovery, you’ll need a Shopify/OneSignal integration app, or you’ll have to use Shopify’s built-in automation for email (which is easier for non-coders). There are a few paid apps that bridge this gap, but most aren’t free.

What works without extra apps: - Manual notifications: Send a push every so often about a flash sale or restock. - Scheduled campaigns: Promote new products or discounts.

How to send a push: 1. In OneSignal, click “Messages” → “New Push.” 2. Write something clear (“24-hour sale—20% off storewide”). 3. Pick your target (all users or segments). 4. Schedule or send immediately.

Best practice: Don’t send more than 1–2 pushes per week, or you’ll see a wave of unsubscribes.


Step 8: Segment and Test (But Don’t Overthink It)

OneSignal lets you segment users by location, browser, or how often they visit. This is powerful, but most stores overcomplicate things.

  • Start with: All subscribers.
  • Later: Create segments for repeat buyers or people who clicked before.
  • Ignore for now: Super-detailed segmentation based on niche data. It’s rarely worth the headache early on.

Test different messages and see what gets clicks. Keep it short and honest.


What Actually Moves the Needle

You’ll see guides promising “30%+ sales boosts” from push notifications. Here’s the truth:

  • Push works best as a reminder tool. Abandoned cart emails still generally convert better, but web push is a nice backup.
  • Don’t be spammy. If your notifications look like ads, people will block them. Focus on stuff you’d actually want to get: big sales, back-in-stock alerts, or genuinely useful tips.
  • Measure what matters. Track opt-ins, click rates, and unsubscribes. If your unsubscribes spike, you’re overdoing it.

Quick FAQ

Is this “officially supported” by Shopify?
OneSignal isn’t a Shopify app, so you’re pasting custom code. That’s normal, but Shopify support won’t help if you break your theme.

Can I send push notifications to iPhone users?
Mostly no—Safari on iOS only started supporting web push in 2023, and it’s still limited. Most subscribers will be on desktop Chrome or Android.

Is the free plan enough?
For most small stores, yes. If you grow, OneSignal will prompt you when you hit limits.


Keep It Simple and Iterate

Don’t get sucked into endless customization. Start with a basic opt-in, send a useful notification or two, and see how people react. If it works, double down. If not, tweak your messages or try a new offer. The goal isn’t to nag people—it’s to give them a reason to come back.

Build trust, don’t break it. That’s how you turn notifications from annoying pop-ups into actual sales.