# WebPixel - admin-graphql - OBJECT Version: 2024-04 ## Description A web pixel settings. ### Access Scopes `read_pixels` access scope. ## Fields * [id](/docs/api/admin-graphql/2024-04/scalars/ID): ID! - A globally-unique ID. * [settings](/docs/api/admin-graphql/2024-04/scalars/JSON): JSON! - The settings JSON object for the web pixel. ## Connections ## Related queries * [webPixel](/docs/api/admin-graphql/2024-04/queries/webPixel) The web pixel configured by the app. ## Related mutations * [webPixelCreate](/docs/api/admin-graphql/2024-04/mutations/webPixelCreate) Creates a new web pixel settings. * [webPixelUpdate](/docs/api/admin-graphql/2024-04/mutations/webPixelUpdate) Updates the web pixel settings. ## Related Unions ## Examples ### Query a web pixel Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { webPixel { id settings } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n webPixel {\n id\n settings\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n webPixel {\n id\n settings\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n webPixel {\n id\n settings\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n webPixel {\n id\n settings\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "webPixel": { "id": "gid://shopify/WebPixel/845285844", "settings": "{foo2: 'bar2'}" } } } ### Query a web pixel by its ID Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { webPixel(id: \\\"gid://shopify/WebPixel/845285844\\\") { id settings } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n webPixel(id: \"gid://shopify/WebPixel/845285844\") {\n id\n settings\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n webPixel(id: \"gid://shopify/WebPixel/845285844\") {\n id\n settings\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n webPixel(id: \"gid://shopify/WebPixel/845285844\") {\n id\n settings\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n webPixel(id: \"gid://shopify/WebPixel/845285844\") {\n id\n settings\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "webPixel": { "id": "gid://shopify/WebPixel/845285844", "settings": "{foo2: 'bar2'}" } } }