If you're building custom analytics for Google Shopping campaigns in 2026, understanding how to segment and filter data by product attributes is essential. The Google Ads API provides powerful options for filtering Shopping data by product brand, product type, custom labels, and category — but the documentation can be hard to navigate. This guide covers all available Shopping segments and shows how to use them with practical GAQL query examples.
The Google Ads API provides rich segmentation capabilities for Shopping campaigns through the shopping_performance_view resource. You can break down performance data by product dimensions like brand, category, type, and custom attributes—giving you the granular insights needed for SKU-level optimization.
API Version Note
This guide covers Google Ads API v23 (released January 28, 2026) using the Google Ads Query Language (GAQL). Field names are consistent across recent versions. Always check the official API documentation for the latest reference.
Shopping Resources: Which One to Use?
The Google Ads API provides two main resources for Shopping data, each with different purposes and segmentation capabilities:
| Resource | Purpose | Date Segmentation |
|---|---|---|
shopping_performance_view |
Historical performance data aggregated by product dimensions | Supported |
shopping_product |
Current product state, status, and feed issues | Not Supported |
Important Distinction
shopping_performance_view provides historical data—what your products did in the past. Product attributes reflect their state at the time of each event (click, impression, conversion). shopping_product provides current data—what your products look like right now. Use the former for performance reporting, the latter for feed diagnostics.
When to Use shopping_performance_view
Use shopping_performance_view when you need:
- Performance metrics (impressions, clicks, conversions, cost) by product
- Data segmented by date ranges
- Brand, product type, or custom label performance breakdowns
- Time-series analysis of Shopping campaign performance
When to Use shopping_product
Use shopping_product when you need:
- Current product status and approval state
- Feed issues and disapproval reasons
- Products that have never served ads
- Current product attributes (not historical)
Complete List of Product Segments
The shopping_performance_view resource supports a comprehensive set of product segments. Here's the complete reference for filtering and segmenting your Shopping data:
Product Identity Segments
These segments identify individual products and their basic attributes:
segments.product_item_id
Type: STRING
Description: The unique identifier for the product from your Merchant Center feed (offer_id). This is your SKU.
Use case: Get performance data at the individual product/SKU level.
segments.product_title
Type: STRING
Description: The product title from your Merchant Center feed at the time of the event.
Use case: Analyze performance by product name or search for specific products. Optimizing your product titles can directly improve CTR and conversion rates.
segments.product_brand
Type: STRING
Description: The brand attribute from your Merchant Center feed.
Use case: Filter or segment performance data by brand. Essential for brand performance analysis in multi-brand retailers.
Product Type Segments (5 Levels)
Product type segments correspond to the product_type attribute in your Merchant Center feed, split by hierarchy level. If your product type is "Apparel > Men > Shirts > T-Shirts", the levels would be:
| Segment | Example Value |
|---|---|
segments.product_type_l1 |
Apparel |
segments.product_type_l2 |
Men |
segments.product_type_l3 |
Shirts |
segments.product_type_l4 |
T-Shirts |
segments.product_type_l5 |
(empty if not defined) |
segments.product_type_l1 through l5
Type: STRING
Description: Hierarchical product type from your feed, split into 5 levels. Values reflect the state at the time of each event.
Use case: Analyze performance by product category hierarchy. Use l1 for high-level category reports, deeper levels for detailed analysis.
Google Product Category Segments (5 Levels)
Similar to product type, but based on the Google Product Taxonomy (the google_product_category attribute):
segments.product_bidding_category_level1throughlevel5
These use Google's standardized category IDs rather than your custom product types. Useful for benchmarking against industry categories.
Custom Attribute Segments (Custom Labels)
Custom labels from your Merchant Center feed are available through these segments:
segments.product_custom_attribute0 through 4
Type: STRING
Description: Custom label values from your Merchant Center feed (custom_label_0 through custom_label_4).
Use case: Segment by margin tier, season, promotion status, stock level, or any custom classification you've defined in your feed.
| API Segment | Merchant Center Attribute |
|---|---|
segments.product_custom_attribute0 |
custom_label_0 |
segments.product_custom_attribute1 |
custom_label_1 |
segments.product_custom_attribute2 |
custom_label_2 |
segments.product_custom_attribute3 |
custom_label_3 |
segments.product_custom_attribute4 |
custom_label_4 |
Channel and Condition Segments
segments.product_channel
Type: ENUM (ONLINE, LOCAL)
Description: Whether the product was shown for online or local inventory.
Use case: Separate online vs local inventory performance for omnichannel retailers.
segments.product_condition
Type: ENUM (NEW, REFURBISHED, USED)
Description: The product condition attribute from your feed.
Use case: Compare performance of new vs used/refurbished inventory.
Additional Product Segments
| Segment | Description |
|---|---|
segments.product_country |
Target country of the product |
segments.product_language |
Language of the product feed |
segments.product_store_id |
Store ID for local inventory |
segments.product_channel_exclusivity |
Single-channel or multi-channel product |
GAQL Query Examples
Here are practical Google Ads Query Language (GAQL) examples for common Shopping segment use cases:
Filter by Product Brand
Get performance data for a specific brand:
SELECT
segments.product_brand,
segments.date,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value
FROM shopping_performance_view
WHERE segments.date DURING LAST_30_DAYS
AND segments.product_brand = 'Nike'
ORDER BY metrics.conversions_value DESC
Brand Performance Comparison
Compare all brands in your portfolio:
SELECT
segments.product_brand,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value
FROM shopping_performance_view
WHERE segments.date DURING LAST_30_DAYS
AND metrics.impressions > 0
ORDER BY metrics.conversions_value DESC
LIMIT 50
Product Type Level 1 Analysis
Analyze performance by top-level product categories:
SELECT
segments.product_type_l1,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value,
metrics.search_impression_share
FROM shopping_performance_view
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC
Custom Label Segmentation
Segment by custom label (e.g., margin tier in custom_label_0):
SELECT
segments.product_custom_attribute0,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value
FROM shopping_performance_view
WHERE segments.date DURING LAST_30_DAYS
AND segments.product_custom_attribute0 IS NOT NULL
ORDER BY metrics.conversions_value DESC
Combined Brand + Product Type Analysis
Get granular data by combining multiple segments:
SELECT
segments.product_brand,
segments.product_type_l1,
segments.product_type_l2,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value
FROM shopping_performance_view
WHERE segments.date DURING LAST_30_DAYS
AND metrics.cost_micros > 0
ORDER BY metrics.conversions_value DESC
LIMIT 100
Row Explosion Warning
Each additional segment field exponentially increases the number of rows returned. A query with brand + product_type_l1 + product_type_l2 + date could return millions of rows for large catalogs. Use LIMIT and filters to keep queries manageable.
SKU-Level Daily Performance
Get daily time-series data for individual products:
SELECT
segments.date,
segments.product_item_id,
segments.product_title,
segments.product_brand,
metrics.impressions,
metrics.clicks,
metrics.cost_micros,
metrics.conversions,
metrics.conversions_value,
metrics.search_impression_share,
metrics.search_click_share
FROM shopping_performance_view
WHERE segments.date DURING LAST_30_DAYS
AND metrics.cost_micros > 0
ORDER BY segments.date DESC, metrics.cost_micros DESC
LIMIT 1000
Filtering with Segments in WHERE
Segments can be used in both SELECT (to break down data) and WHERE (to filter data). Here are the key filtering patterns:
Exact Match Filter
WHERE segments.product_brand = 'Adidas'
Multiple Values (IN)
WHERE segments.product_brand IN ('Nike', 'Adidas', 'Puma')
Not Equal
WHERE segments.product_brand != 'Unknown'
IS NOT NULL (Has Value)
WHERE segments.product_custom_attribute0 IS NOT NULL
LIKE Pattern Matching
WHERE segments.product_type_l1 LIKE '%Electronics%'
Pro Tip
When filtering by segments, you don't need to include the segment in SELECT if you only want to filter, not segment, by it. For example, you can filter by brand without including brand in your output columns.
Segment Compatibility
Not all segments work together. The Google Ads API enforces compatibility constraints that you need to understand:
Date Segmentation Rules
For shopping_performance_view, date segments (segments.date, segments.week, segments.month, etc.) are fully supported. However, for shopping_product, date segmentation is NOT allowed and will return an UNSUPPORTED_DATE_SEGMENTATION error.
Incompatible Segments
Critical: Selecting any segments.keyword.* field implicitly filters results to Search Network keyword traffic only, excluding Shopping campaigns entirely. Never use keyword segments when analyzing Shopping data.
Checking Compatibility
Use the GoogleAdsFieldService or the Interactive Query Builder in Google's documentation to verify which segments and metrics can be selected together. Each field has a selectable_with list showing compatible fields.
Best Practices
1. Start Broad, Then Drill Down
Begin with high-level segments (product_type_l1, product_brand) to identify patterns, then add detail (product_item_id, date) for specific analysis. This keeps initial queries fast and helps you understand where to focus.
2. Use Meaningful Custom Labels
The power of product_custom_attribute0-4 segments depends entirely on how you've set up your custom labels in Merchant Center. Common high-value strategies:
- Margin tier: "high_margin", "medium_margin", "low_margin"
- Performance tier: "hero", "standard", "long_tail"
- Season: "spring_2026", "evergreen"
- Stock status: "high_stock", "low_stock", "clearance"
- Price range: "under_50", "50_100", "over_100"
3. Handle Empty Values
Products may have empty values for some segments (e.g., no brand set, only 2 product type levels). Your queries and analysis should handle these cases:
-- Exclude products without brand data
WHERE segments.product_brand IS NOT NULL
AND segments.product_brand != ''
4. Account for Historical Context
Remember that shopping_performance_view reflects product attributes at the time of each event. If you changed a product's brand or category last week, older data will show the old values. This is actually useful for before/after analysis.
5. Paginate Large Queries
For large catalogs with long date ranges, implement pagination:
- Use LIMIT and offset patterns
- Break date ranges into smaller chunks
- Consider async processing for very large exports
6. Cache Reference Data
Product attributes don't change often. Cache segment values (list of brands, product types) separately from metrics to reduce API calls and improve application performance.
Key Takeaway
The Google Ads API provides comprehensive Shopping segmentation through shopping_performance_view. Key segments for filtering include segments.product_brand (brand analysis), segments.product_type_l1-l5 (category hierarchy), and segments.product_custom_attribute0-4 (custom labels). Use these in both SELECT and WHERE clauses to build powerful, granular Shopping analytics.
Frequently Asked Questions
How do I filter Google Ads API Shopping data by product brand?
Use segments.product_brand in your GAQL query with shopping_performance_view. You can add it to SELECT to segment data by brand, or use it in WHERE to filter for specific brands. Example: WHERE segments.product_brand = 'Nike'
What is the difference between shopping_performance_view and shopping_product?
shopping_performance_view provides historical performance data aggregated by product dimensions and supports date segmentation. shopping_product provides the current state of products including status and issues, but does NOT support date segmentation. Use the former for performance reporting, the latter for feed diagnostics.
How many product type levels are available in the Google Ads API?
The Google Ads API provides 5 product type levels: segments.product_type_l1 through segments.product_type_l5. These correspond to the product_type attribute in your Merchant Center feed, split by the '>' delimiter.
Can I filter by custom labels in the Google Ads API?
Yes, the Google Ads API supports all 5 custom label fields via segments.product_custom_attribute0 through segments.product_custom_attribute4. These correspond to custom_label_0 through custom_label_4 in your Merchant Center feed.
Why do some segment combinations return errors?
Not all segments are compatible with each other. The Google Ads API has a 'selectable_with' constraint that defines which segments can be used together. Check the segmentation documentation for compatibility rules.
Conclusion
The Google Ads API provides powerful segmentation capabilities for Shopping campaigns through the shopping_performance_view resource. Key product segments include:
- Identity:
product_item_id,product_title,product_brand - Category hierarchy:
product_type_l1throughl5 - Google taxonomy:
product_bidding_category_level1throughlevel5 - Custom labels:
product_custom_attribute0through4 - Attributes:
product_channel,product_condition,product_country
Use these segments in SELECT to break down metrics by product dimensions, or in WHERE to filter for specific products, brands, or categories. Remember that shopping_performance_view supports date segmentation while shopping_product does not. Be sure to check our v23 update guide for the latest changes to segment availability and API features.
For more on the metrics you can combine with these segments, see our Google Ads API Metrics guide. Tools like SKU Analyzer handle all this API complexity automatically, pulling Shopping performance data segmented by brand, product type, and custom labels into a unified dashboard.