Solved

[ISSUE] Creating a web pixel app extension returns "No extension found"

AlexRob
Shopify Partner
2 1 3

Hello,

 

We are trying to create a Web Pixel app extensions, and everything is going fine, but we are having issues with the step 5 of the tutorial here: https://shopify.dev/docs/apps/marketing/pixels/getting-started#step-5-create-a-web-pixel-setting-for...

It's all in a dev store, and using the basic CLI commands for creating the app and the extension, everything shows up in the customer event, but with a disconnected status.

I'm not sure how we are supposed to then do the mutation, and since it does not work in the graphiql app, we added a custom app with enough rights to manually do the mutation via postman.

However, when sending the request here is the response we are getting (the request is the one provided in the doc).

{
    "data": {
        "webPixelCreate": null
    },
    "errors": [
        {
            "message": "No extension found.",
            "locations": [
                {
                    "line": 3,
                    "column": 3
                }
            ],
            "path": [
                "webPixelCreate"
            ]
        }
    ],
    "extensions": {
        "cost": {
            "requestedQueryCost": 10,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 1000.0,
                "currentlyAvailable": 990,
                "restoreRate": 50.0
            }
        }
    }
}

So, here is my question, can someone explain to me what is happening here and what should be done differently ?

Accepted Solution (1)
AlexRob
Shopify Partner
2 1 3

This is an accepted solution.

Hey @danpaz, the solution is that the graphQL query needs to be done by your app, and not through the Shopify app (GraphiQL) installed on the store.

If you started your app with Remix, just add a button in the default interface that will call the mutation, if you do that you'll be able to activate the web pixel on your shop.

View solution in original post

Replies 5 (5)

danpaz
Shopify Partner
1 0 0

I'm having the same issue following the same tutorial.

AlexRob
Shopify Partner
2 1 3

This is an accepted solution.

Hey @danpaz, the solution is that the graphQL query needs to be done by your app, and not through the Shopify app (GraphiQL) installed on the store.

If you started your app with Remix, just add a button in the default interface that will call the mutation, if you do that you'll be able to activate the web pixel on your shop.

Panos_Georgiou
Shopify Partner
3 0 3

Hi,

 

Is there a way this can be achieved without having to create a user interface? 

 

Thank you in advance

vijigeo
Shopify Partner
1 0 0

Am also wondering the same based on AlexRob's answer. I imagine you'd need some backend to accomplish this if you don't want to create a user interface.

 

badrooxe
Shopify Partner
6 0 1

Hey, I think you can do that by attaching the function that executes the mutation to the install function of the app, so it runs oninstall !