Wholesale Shopify: Hiding Prices from Google for Logged-In Customers
Understanding the Challenge: Hiding Prices in Shopify Wholesale Stores
The Shopify Community forum discussion, initiated by Daaniel and titled "Hide prices from Google, a wholesale shop with Login," highlights a common challenge for wholesale store owners: preventing product prices from being displayed in Google search results while ensuring they remain visible to logged-in customers. This is crucial for maintaining a controlled pricing environment and preventing unauthorized access to wholesale pricing.
Analyzing Proposed Solutions
Several approaches were discussed in the thread, each with its own implications:
1. The data-nosnippet Attribute
Maximus3 suggested using the data-nosnippet attribute on the price element:
$99.99
While this might seem like a quick fix, it's important to understand its limitations. The data-nosnippet attribute is a hint to search engines, not a guarantee. Google may still choose to index the price if it finds it elsewhere on the page. Furthermore, this approach only hides the price snippet; it doesn't prevent Google from crawling and indexing the price on the product page itself.
2. JSON-LD Customization and Content Gating
PaulNewton, a Shopify Partner, recommended JSON-LD customization and content gating. This involves modifying the structured data markup that Shopify automatically generates for products. He also mentioned that if schema is being read by bots, other info may also be scraped.
This is a more robust approach, as it directly addresses the schema data that Google uses to display product information in search results. However, it requires technical expertise to implement correctly.
3. Modifying the Theme's JSON-LD Output
tim_1 provided a detailed explanation of how to modify the theme's JSON-LD output. He pointed out that current themes use a simplified approach:
Older themes, however, constructed the JSON-LD output directly in Liquid, offering more control: