Web Pixel app extension doesn’t update automatically on deploy

Topic summary

Web pixel app extension code changes are not immediately reflected on development stores after deploy, causing testing delays. Initial creation via webPixelCreate works, but subsequent deploys don’t auto-update in the dev store.

Observed behavior: Updates may appear only after minutes or require uninstall/reinstall. Production (non-development) stores load the latest code reliably. Deleting/recreating the pixel in dev via mutations didn’t force immediate refresh.

Workarounds and actions:

  • Run the GraphQL webPixelUpdate mutation with the correct webPixel ID to update settings (does not refresh code).
  • Uninstall/reinstall the app to refresh the pixel in the merchant store.
  • Copy app pixel code into a custom pixel in the dev store to test events and mappings.
  • Turn off “Development store preview” (a screenshot was shared showing the setting), which helped some.
  • Ensure “shopify app deploy” is run to build/publish a new extension version.
  • Add a console-logged version number to verify the deployed build in browser.

Status: No confirmed fix; likely a dev-store caching/preview issue. Key questions remain on whether auto-update is expected and if updates must be pushed per store. Discussion remains open.

Summarized with AI on December 19. AI used: gpt-5.

Hi, yesterday I created a new web pixel app extension, and when I first deployed it I ran the webPixelCreate mutation to create a pixel on my development store. When I deployed a new version of the extension it didn’t update on my development store, even after a few hours. Eventually I just tried to run the webPixelUpdate mutation because I was out of options, and that worked. Is this expected behavior? Because the docs for webPixelUpdate state that it is only used to update the web pixel settings, not the actual code. I followed a shopify article on how to setup the web pixel, but did I do something wrong? Does this mean we have to run the webPixelUpdate mutation for all stores that have our app installed every time we make a change?

4 Likes

I’m experiencing the same issue. Even when creating a new extension version and “publishing” it the code does not update in the dev store. I’ve been uninstalling and re-installing the app in the merchant store to get it to work, I’ll try the webPixelUpdate mutation but I agree that seems like a workaround.

1 Like

Did you end up figuring this out? The webPixelUpdate mutation hasn’t been working for me.

I also have been uninstalling and reinstalling the app, but it’s so frustrating.

Unfortunately, I haven’t been able to get it to work in the dev environment. I ended up just writing the code without testing it, and when the app was approved and I installed the app on a non-development store the updated code was being loaded in. So far everything seems to work normally on client stores, but still not in my dev environment…

1 Like

Hi,
The mutation webPixelUpdate required the webPixel id while calling.
Please see the below it helps.

const settings= {setting1:setting1Val, setting2:setting2Val,...};
const webPixel = await client.query({
      data: {
        "query": `mutation webPixelUpdate($id: ID!, $webPixel: WebPixelInput!){
          webPixelUpdate(id: $id, webPixel: $webPixel) {
            userErrors {
              code
              field
              message
            }
            webPixel {
              settings
              id
            }
          }
        }`,
        "variables": {
          "id": webPixelID,
          "webPixel": {
            "settings": settings
          }
        },
      },
    });
    console.log("=== webPixelUpdate ===",webPixel.body.data.webPixelUpdate)

No dice, running that mutation after deploying a new version of my pixel extension does not cause the extension code to immediately update in browser. I’ve also tried running mutations to delete and recreate the pixel in my dev store which also had no effect.

My changes seem to show up within a couple of minutes, but it is frustrating. I need to console.log a version number that I increment after every build and deploy to ensure the behavior I’m seeing in browser is from my latest version :angry: .

2 Likes

@kajderuyter @weotch any one has completed the web pixel ? i want to add some code on checkout steps how I can do that.?

Running into the same issue and it’s basically blocking us from testing our web pixel before deployment. The current work around we’re using is to code the web pixel in the app, and then copy/paste the code into a custom pixel in our development store, replacing all the settings fields with the expected values. We can’t test that the install works (we’ve changed the settings fields so it won’t install at all anymore because it thinks they shouldn’t exist), but at least we could move forward in developing the pixel itself and testing it with the relevant events.

You can try to turn off the Development store preview. it’s worked for me.

1 Like

In our case it was the missing “shopify app deploy” to build a new version.