How can I query web pixels without the ID?

daveluke
Shopify Partner
19 0 4

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
3 0 0

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,
  }
}