We’re encountering an issue where our gated B2B wholesale pricing is being exposed in our page source code for non-logged in users and web crawlers. As a result, our pricing is accessible to Google for meta descriptions and competitor crawlers. The problem occurs specifically inside of this Shopify Analytics code block:
<script id="web-pixels-manager-setup">
The out-of-the-box Shopify options are severely limited. Shopify Support suggested restricting store access to logged-in B2B customers only, but that prevents valuable brand exposure and restricts end users from crucial information such as replacement parts and product specs.
The only alternative solution presented to us was the following:
Customize the Web Pixels API to suppress or omit price data for unauthenticated sessions this is the targeted fix that keeps your product pages publicly accessible while stopping pricing from being exposed in the script.
Has anyone else encountered this issue? It feels like a sizable problem for Shopify Plus B2B users and hopefully a more intuitive solution is available sooner rather than later.
Realistic workarounds people are using: store wholesale prices in a metafield instead of variant prices, then display them via Liquid only when customer.b2b? is true, leaving the public variant price as MSRP or zero so the pixel can’t leak the real number. The downside is you have to recreate cart and discount logic around the metafield, which gets complicated. Some shops also use a separate B2B-only Shopify expansion store so the public storefront never has wholesale data at all, cleaner but obviously more setup.
Post this on community.shopify.dev and tag it Plus B2B if you haven’t. The product team actually engages there and this is the kind of feedback that ships fixes faster than going through standard support.
Hope that helps! If it did, a Like and Marking it as Solution goes a long way and helps others find the fix faster too.
Thank you! We appreciate the proposed workaround. It would require a lot of logistical overhaul since we’ve built a rather robust price integration around conventional Shopify pricing (custom SAP ERP integration, custom cart, smart collections, etc.) but it already sounds like a much more viable solution than what was provided previously by Support.
I appreciate the suggestion of posting on the Dev forum as well. Will do that now!
Adding to what Moeed mentioned, one thing that helped us was disabling the web-pixels-manager analytics for non-logged-in visitors via a custom pixel setup. You can rebuild your analytics in App Pixels mode where you control which events fire pre-login. Doesn’t remove the gated pricing exposure entirely but cuts the script payload that’s been leaking it. Also if your priority is keeping Google off the wholesale prices specifically rather than competitor crawlers, a tighter fix is using meta robots noindex on B2B-relevant URLs and updating your robots.txt to disallow the analytics endpoint paths. Are you mostly worried about Google surfacing them in search snippets or about scrapers harvesting them?