MultiPixelsStart now
pixel setup8 min read

How to Keep Facebook Google Ads Tracking Working When You Switch Shopify Theme

Theme table with the old row crossed out as "theme.liquid" and a highlighted row with a green "Pixels active" chip.

To keep Facebook Google Ads tracking working when you switch Shopify theme, move your pixels out of the theme and into an app before you publish the new design. Pixels pasted into theme.liquid stay with the old theme and disappear when you change. Pixels run by an app or through Shopify customer events carry over untouched. Below is why, then a five-step checklist. No code or tech team required.

Key takeaways

  1. Pixel code pasted into theme.liquid belongs to that theme and is gone when you publish a new one.

  2. Pixels managed by an app or run through Shopify customer events are not tied to your theme, so they keep working.

  3. Lost tracking means wasted ad spend and broken attribution right after launch.

  4. Audit, remove duplicates, move pixels into an app, publish, then test.

  5. Test with Meta Pixel Helper and Google Tag Assistant before you raise any budget.

Keeping Facebook and Google Ads tracking when you change themes

Your tracking carries over if your pixels do not live inside the theme. Tracking managed by an app or by Shopify customer events stays in place when you switch. Tracking pasted into theme files does not.

A theme is a set of design files. When you publish a new one, Shopify swaps the whole set, and anything you added by hand to the old files stays behind. Your store looks fine and orders still come in. Nothing warns you that the pixels stopped firing.

Why pixels in theme.liquid disappear with the old theme

Pixels in theme.liquid disappear because that file is part of the old theme. The new theme has its own copy, and your code isn't in it.

Many stores added their Facebook or Google tags this way, often years ago. A developer or a tutorial said to paste the snippet into the head of the page. It worked, so nobody touched it again. Then a redesign arrives and the snippet is left behind.

The cost shows up fast:

  • Facebook and Google can't see purchases, so they can't find more people like your buyers.
  • Your campaigns run on thin data while the budget keeps spending.
  • Shopify shows orders, but Ads Manager and Google Ads show few or none.
  • You can't tell which ads work, so you may pause good campaigns or back weak ones.

You can fix this after launch. It is cheaper to avoid it.

Why app pixels and Shopify customer events survive a theme change

App pixels and Shopify customer events survive because they are stored at the store level, not inside a theme. Shopify customer events is the area under Settings > Customer events where pixels now live. It supports app pixels, which an app installs for you, and custom pixels, which you add yourself.

Pixels there run apart from your theme files, so publishing a new design doesn't touch them. A theme update won't break your tracking either.

One note for apps that use theme app embeds. Some can come up switched off in a new theme. Open the theme editor on the new theme, check the app embeds panel, and confirm anything you rely on is on.

Checklist: move your pixels before you redesign

Three panels, left to right, show the steps Audit code, Move to app, and Test events, each with a status chip.

Move your pixels in five steps: audit, remove duplicates, move to an app, publish, then test. Do the first three while the old theme is still live.

1. Audit your existing pixel code

Write down every pixel you run now, so nothing is missed.

  1. In Shopify admin, go to Online Store > Themes and open the code editor for your live theme.
  2. Open theme.liquid and look for Facebook, Google Ads, Google Analytics or tag manager code.
  3. Check any custom sections or snippets where someone may have added tracking.
  4. Go to Settings > Customer events and see what is already running there.
  5. Note each platform, its pixel or tag ID, and the events it tracks, such as purchase, add to cart and view content.

Keep this note. It is your backup if something goes wrong.

2. Remove duplicates so events are not counted twice

Two copies of the same pixel count each sale twice. Your ROAS looks better than it is, and you spend based on wrong numbers.

Compare your audit against what an app or customer events already run. If a pixel appears in both places, keep only the app version. Don't delete the old theme code yet. Remove it once the new setup is confirmed.

3. Move every pixel into an app like MultiPixels

Put all pixels in one app so none depend on a theme. MultiPixels installs and manages pixels for Facebook, Instagram, TikTok, Snapchat, X and Pinterest through Shopify's customer events. Nothing goes into your theme, and no code or tech team is required.

  1. Install MultiPixels from the Shopify App Store.
  2. Choose your platforms from the list. The Facebook pixel page shows how Facebook is set up.
  3. Paste your pixel IDs from your audit note.
  4. Map your events, starting with purchase.
  5. Confirm each pixel shows as active.

MultiPixels also includes a backup pixel and tools for custom and lookalike audiences. It doesn't write your ads or replace your ad platforms, and it is a paid app once the trial ends. Check the integrations page for the current list of platforms before you plan around one. If you run Google tags that MultiPixels doesn't manage, keep them in a theme-independent setup too, such as Shopify's own Google channel, and still follow the audit and test steps. The Google Ads conversion tracking guide covers that setup.

4. Publish the new theme

Publish only after the pixels are running outside the theme. In Online Store > Themes, find your new theme and choose Publish. Then open the theme editor and check that any app embeds you use are switched on.

Keep the old theme in your library for a while. If something looks wrong, you can compare it against the old files.

5. Test events with Meta Pixel Helper and Google Tag Assistant

A single Purchase test order splits into two results: Meta Pixel Helper and Google Tag Assistant, each with a green status.

A test order is the only reliable way to know tracking survived. Do this before you raise your budget.

  1. Open your store in a private browser window.
  2. Turn on Meta Pixel Helper and Google Tag Assistant in your browser.
  3. View a product, add it to your cart and start checkout.
  4. Place a test order.
  5. In Meta Pixel Helper, confirm the Facebook pixel loads and the purchase event shows once.
  6. In Google Tag Assistant, confirm your Google tag is detected and the conversion event fires.
  7. Check Meta Events Manager and your Google Ads account for the event a little later.

Events can take a short while to appear. If nothing shows, look for a second copy of a pixel, a missing pixel ID, or an app embed that is switched off. If Pixel Helper reports nothing at all, see what to do when Meta Pixel Helper says no pixel found.

How the ways of running pixels compare

The table shows how the common setups behave when you change themes. Entries for other approaches are general, so check details against each tool's own help pages.

Pasted into theme.liquid Custom pixel in customer events MultiPixels
What it does Runs code that sits inside the theme files Runs code you write in Shopify's customer events Installs and manages pixels through customer events
Survives a theme change No, you must paste it again Yes Yes
Code needed Yes Yes No code or tech team required
Platforms Anything you can code Anything you can code Facebook, Instagram, TikTok, Snapchat, X and Pinterest
Backup pixel Only if you build it Only if you build it Yes
Audience tools No No Custom and lookalike audience builders
Cost Free, plus your time Free, plus your time $9.99, $19.99 or $39.99 a month after a 10-day free trial

What to check right after launch

Check your numbers the same day you publish. Compare a short date range in Shopify with the purchases in each ad platform.

Expect small gaps. Ad platforms count sales tied to ad clicks, so they usually report fewer than Shopify shows in total. They may also use a different attribution window. You should not see zero-value purchases, double counts or whole days with no purchases. If the gap is wide, look for duplicate pixels, a missing order value, or cookie consent settings that block the event. The guide on fixing pixel and Shopify analytics data mismatch goes deeper.

Protect your tracking before your next redesign

A new theme shouldn't cost you weeks of good ad data. Move your pixels out of the theme, remove duplicates and test every event before you spend more. Install the MultiPixels app from Shopify and start the 10-day free trial.

FAQ

Questions, answered.

Still unsure? Our support team is here to help.

SUPPORT

Talk to our team

The people who build MultiPixels answer every message.

Start with a working pixel. Facebook can only find more buyers if it sees your purchases, so install the Facebook pixel and confirm purchase events arrive in Events Manager. Then run ads to the products you want to sell and use custom and lookalike audiences to reach people similar to your buyers. MultiPixels sets up the pixel and includes audience tools, with no code required.

Explore next

Keep reading.

All articles
Settings screen for MonsterInsights marked "WordPress only," with a smaller Shopify pixel list showing two active rows.
November 27, 2026 · CONVERSION TRACKING

MonsterInsights vs Shopify Pixel App: Which Tracks Google and Facebook Ad Conversions Better?

Read article