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
mutation webPixelUpdate($id: ID!, $webPixel: WebPixelInput!) {
webPixelUpdate(id: $id, webPixel: $webPixel) {
userErrors {
field
message
}
webPixel {
# WebPixel fields
}
}
}
Input
{
"id": "gid://shopify/<objectName>/10079785100",
"webPixel": {
"settings": "{ \"name\": \"Size\", \"values\": [\"M\", \"L\"] }"
}
}
{
"id": "gid://shopify/<objectName>/10079785100",
"webPixel": {
"settings": "{ \"name\": \"Size\", \"values\": [\"M\", \"L\"] }"
}
}
input WebPixelInput {
settings: JSON!
}