Anchor to webPixelUpdateweb
webPixelUpdate
mutation
Requires access scope. Also: The app requires read_customer_events access scope and user access permission.
Activate a web pixel extension by updating a web pixel record on the store where you installed your app.
When you run the mutation, Shopify validates it
against the settings definition in
shopify.extension.toml
. If the settings
input field doesn't match
the schema that you defined, then the mutation fails. Learn how to
define web pixel settings.
Anchor to Arguments
Arguments
- •ID!required
The ID of the web pixel to update.
- Anchor to webPixelweb•
Pixel WebPixel requiredInput! The web pixel settings in JSON format.
Was this section helpful?
Anchor to WebPixelUpdatePayload returnsWebPixelUpdatePayload returns
- Anchor to userErrorsuser•
Errors [ErrorsWeb non-nullPixel User Error!]! The list of errors that occurred from executing the mutation.
- Anchor to webPixelweb•
Pixel The updated web pixel settings.
Was this section helpful?
Mutation Reference
1mutation webPixelUpdate($id: ID!, $webPixel: WebPixelInput!) {2 webPixelUpdate(id: $id, webPixel: $webPixel) {3 userErrors {4 field5 message6 }7 webPixel {8 # WebPixel fields9 }10 }11}
Input
1{2 "id": "gid://shopify/<objectName>/10079785100",3 "webPixel": {4 "settings": "{ \"name\": \"Size\", \"values\": [\"M\", \"L\"] }"5 }6}
{
"id": "gid://shopify/<objectName>/10079785100",
"webPixel": {
"settings": "{ \"name\": \"Size\", \"values\": [\"M\", \"L\"] }"
}
}
input WebPixelInput {
settings: JSON!
}