A theme app extension boilerplate that highlights the basic structure and features that are available to developers who want to integrate their apps with Shopify Online Stores.
Hi, I'm trying to activate a Shopify web pixel extension on a production store. The web pixel extension is configured in the Shopify Remix app template. The backend is wired to Express.js.
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
}
}
}
{
"error":
"Error during Oauth callback",
"message": Cannot complete Oauth process.
Could not find an Oauth cookie for shop url: the-shop.myshopify.com"
}
express-url-endpoint/auth token exchange results to:
{
"error:":
"Error during token exchange",
"message": "Request failed with status code 401"
}
Issue:
Hi, I'm trying to activate a Shopify web pixel extension on a production store. The web pixel extension is configured in the Shopify Remix app template. The backend is wired to Express.js.
What I've tried:
Approach_1: I was able to activate it on the dev/test store using the Shopify app dev GraphQL by following this guide https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels#:~:text=To%20activate%20a%20web%20pixel,extension. However, I couldn't apply it on the production store since i cannot run
shopify app dev
on production store to open up the shopify GraphQL console.Approach_2: I've also tried this guide that activates the pixel using shopify remix app's loader function. Unfortunately it didn't work as well. https://community.shopify.com/c/extensions/how-do-you-actually-activate-the-web-pixel/m-p/2496617
shopify remix app template > app app._index.jsx
Approach_3: Oauth redirect and Token Exchange on Express.js endpoint routes>shopifyRouter.js file
shopifyApi.js file
Here are the approach_3 's results
express-url-endpoint/install
results to:express-url-endpoint/auth
token exchange results to: