Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How can I query web pixels without the ID?

How can I query web pixels without the ID?

daveluke
Shopify Partner
25 2 10

I need to update my web pixel code, but it seems that I have to run webPixelUpdate in order to have it show.

 

Unfortunately, I have not saved the web pixel's ID when creating it. How do I retrieve web pixels for a given store without the ID? It seems there are only methods for retrieving by ID.

Replies 2 (2)

RonnyACohen
Shopify Partner
7 0 1

did you  managed to get it ?

jeff76
Shopify Partner
2 0 1

There is a GraphQL query to get the ID of the Web Pixel for a store. You need to call it using the access token for the store in which you created it.

 

{
  webPixel {
      id
      settings,
  }
}