Ads Taxonomy
The Ads Taxonomy template provides a table that shows available brands, departments, and categories, including their product counts. Running this template can help you make informed decisions about which brands and categories to include in your downstream analysis.
This template helps you understand the product hierarchy and select the most relevant brands and categories before running other templates like Lifetime Value (LTV), Purchase Frequency, or New to Brand.
You can perform the following actions with this template:
- Explore available brands and categories in the dataset.
- See product counts for each brand and category combination.
- Discover the product hierarchy (Department > Super Category > Category > Brand).
- Focus on high-volume categories and brands for analysis.
- Learn about aggregation levels for other templates.
Run the query
Use the following query to retrieve the ads taxonomy:
set cleanroom_name = 'CLEANROOM_NAME';
call samooha_by_snowflake_local_db.consumer.run_analysis(
$cleanroom_name, -- cleanroom name
'ads_taxonomy',
[], -- Consumer tables (none needed)
[], -- Provider tables (none needed)
object_construct() -- No parameters required
);
Parameters
This template requires no parameters. It returns the complete taxonomy of available brands and categories.
Result
| Result | Description |
|---|---|
brand | The brand name (corresponds to entity_brand_name in other templates). |
department | The department classification (corresponds to delivered_entity_department aggregation level). |
super_category | The super category classification (corresponds to delivered_entity_super_category aggregation level). |
category | The category classification (corresponds to delivered_entity_category aggregation level). |
total_products | The number of distinct products within this brand/category combination. |
Example result
| BRAND | DEPARTMENT | SUPER_CATEGORY | CATEGORY | TOTAL_PRODUCTS |
|---|---|---|---|---|
| BRAND_NAME_1 | DEPARTMENT_1 | SUPER_CATEGORY_1 | CATEGORY_NAME_1 | 15 |
| BRAND_NAME_2 | DEPARTMENT_1 | SUPER_CATEGORY_1 | CATEGORY_NAME_1 | 42 |
| BRAND_NAME_3 | DEPARTMENT_1 | SUPER_CATEGORY_1 | CATEGORY_NAME_2 | 28 |
Use results in other templates
The values returned by this template can be directly used as parameters in other templates.
For brand filtering, use the BRAND column values in the brands parameter of other templates.
'brands', ['BRAND_NAME_1', 'BRAND_NAME_2']
For category filtering, use the CATEGORY column values in the categories parameter of other templates.
'categories', ['CATEGORY_NAME_1', 'CATEGORY_NAME_2']
For aggregation levels, ensure the column names correspond to aggregation level options.
DEPARTMENT→delivered_entity_departmentSUPER_CATEGORY→delivered_entity_super_categoryCATEGORY→delivered_entity_categoryBRAND→delivered_entity_brand
Data collection and classification
The Ads Taxonomy template organizes and categorizes the data using the following methods:
- Aggregated data only. Returns product counts and taxonomy information, not individual customer data.
- No user information. Contains only product metadata, no user identifiers or purchase behavior.
- Public taxonomy. Provides reference data that helps partners understand available product classifications.
Use cases
The following use cases are examples of how this template works:
- Template parameter discovery. Run this template first to discover valid brand and category names before using other templates.
- Product portfolio analysis. Identify which brands and categories have the most products available for analysis.
- Hierarchy understanding. Understand the relationship between departments, super categories, categories, and brands.
- Volume-based filtering. Focus your analysis on high-volume categories (those with higher
TOTAL_PRODUCTScounts) for more detailed statistical results.
Best practices
Consider the following best practices when using this template:
- Run first. Execute this template before running other analyses to understand available data.
- Volume consideration. Categories with higher product counts may provide more statistically significant results in other templates.
- Exact matching. Use exact brand and category names as returned by this template in other queries.
- Hierarchy planning. Understand the product hierarchy to choose appropriate aggregation levels for your business questions.
Integrate with other templates
This template is designed to work with the following templates:
- LTV. Used to discover brands or categories for LTV analysis. For more information, see LTV.
- Purchase Frequency. Filters by relevant product categories. For more information, see Purchase Frequency.
- New to Brand. Focuses on specific brands for acquisition analysis. For more information, see New to Brand.