Run this to create pixel in production after store installs app
mutation {
# This mutation creates a web pixel, and sets the accountID declared in shopify.extension.toml to the value 123.
webPixelCreate(webPixel: { settings: "{\"accountID\":\"123\"}" }) {
userErrors {
code
field
message
}
webPixel {
settings
id
}
}
}
Here's the response with pixel id
{
"data": {
"webPixelCreate": {
"userErrors": [],
"webPixel": {
"settings": "{\"accountID\":\"123\"}",
"id": "gid://shopify/WebPixel/974913819"
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1990,
"restoreRate": 100
}
}
}
}
Run this to create pixel in production after store installs app
mutation {
# This mutation creates a web pixel, and sets the accountID declared in shopify.extension.toml to the value 123.
webPixelCreate(webPixel: { settings: "{\"accountID\":\"123\"}" }) {
userErrors {
code
field
message
}
webPixel {
settings
id
}
}
}
Here's the response with pixel id
{
"data": {
"webPixelCreate": {
"userErrors": [],
"webPixel": {
"settings": "{\"accountID\":\"123\"}",
"id": "gid://shopify/WebPixel/974913819"
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1990,
"restoreRate": 100
}
}
}
}