cja_get_top_items
Retrieve top N dimension items ranked by a metric for a specified date range. Ideal for identifying top performers such as pages by visits or products by revenue.
Instructions
Get top N items for a dimension ranked by a metric.
This tool is optimized for finding the top performing dimension items based on a single metric, such as top pages by visits, top products by revenue, etc.
Args: dimension: Dimension ID (e.g., 'variables/page', 'variables/product'). metric: Metric ID to rank by (e.g., 'metrics/visits', 'metrics/revenue'). start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. limit: Number of top items to return (default: 10, max: 500). dataview_id: Optional data view ID (uses configured default if not provided).
Returns: Dictionary with top dimension items and their metric values.
Example queries: - "What are the top 10 pages by visits this week?" - "Show me the top 20 products by revenue last month" - "Which marketing channels drove the most conversions?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dimension | Yes | ||
| metric | Yes | ||
| start_date | Yes | ||
| end_date | Yes | ||
| limit | No | ||
| dataview_id | No |