Re: How to get app's web pixel id?

Solved

How can I find an app's web pixel id after activation?

sirev
Shopify Partner
15 4 3

Hi there,

I have been developing the web pixel's extension for an app (https://shopify.dev/apps/marketing/pixels). In the phase of development I need to get that app's pixel id after activating the web pixel, how do I get it through the GraphQL or in the Dashboard view?

 

I know there's a returning object after triggering mutation webPixelCreate that returns these data (https://shopify.dev/api/admin-graphql/2022-10/mutations/webPixelCreate), but is it the only way to view app's web pixel id?

How to get app's web pixel id after activation without re-creating the web pixel itself?

 

Thanks,

Accepted Solution (1)

sirev
Shopify Partner
15 4 3

This is an accepted solution.

The solution, web pixel's id can be found:

  • On storefront website webPixelsConfigList property from web-pixels-manager-setup-esm class (div)

View solution in original post

Replies 3 (3)

sirev
Shopify Partner
15 4 3

This is an accepted solution.

The solution, web pixel's id can be found:

  • On storefront website webPixelsConfigList property from web-pixels-manager-setup-esm class (div)
lecajer
Shopify Partner
1 0 0

Is there a way to grab webPixelsConfigList from another web pixel ?
I'm looking to use window.postMessage() from the main frame to the restricted web pixel iframe

elnormarc
Shopify Partner
7 0 4

Facing same issue, i had active web pixel and it was enabled on multiple stores. Recently i unpublished it and it's now in DRAFT state but it is still showing to Store owner in Custom Event section of the store settings.

 

 

I want to uninstall the pixel from all stores now.

These should be a Admin API graphql Query to get installed web pixels, checking every single storefront's website for pixel ID doesn't make sense to me.  

 

Or is there any way to delete Webpixel extension from partner account?

 

EDIT: This will return webPixel

query{
    webPixel{
        id
    }
}