Loading...
Loading...
Compares the performance of two or more audience segments across key metrics side by side. Use this skill when someone wants to compare audiences or visitor groups — for example, "how do mobile visitors compare to desktop on conversion," "compare new vs. returning visitors," "show me the difference between these two segments," "compare these audiences on our KPIs," or "which segment performs better." Also trigger for "segment comparison" or "audience comparison."
npx skill4agent add adobe/skills aa-segment-performance-comparatorAA Call Budget: AA'saccepts a singlerunReportper call. For N segments × M metrics the comparison requires N×M calls, plus 1 baseline call for the segment-size context panel. For 3 segments × 5 metrics = 16 calls. Limit to 4 segments and 6 metrics for practical performance. Always confirm the segment/metric list with the user before starting.segmentId
findReportSuitessetSessionDefaultsfindSegmentsfindMetricsrunReportfindReportSuitessetSessionDefaultsfindReportSuites(globalCompanyId: "<gcid>", page: 0, limit: 10)
setSessionDefaults(globalCompanyId: "<gcid>", reportSuiteId: "<rsid>")"Which visitor audiences would you like to compare? For example: Mobile vs. Desktop, New vs. Returning, Paid Search vs. Organic, or specific named segments from your library."
findSegments(page: 0, limit: 50)
# Filter locally by name. Built-in IDs: "Paid_Search", "Purchasers", "Return_Visits"Note:does not accept afindSegmentsparameter. Retrieve all segments and filter by name locally. Built-in template segments have short IDs like "Paid_Search" that can be passed directly assearchTerminsegmentIds.runReport
metrics/visitsmetrics/pageviewsmetrics/bounceratemetrics/pagespervisitmetrics/ordersmetrics/revenuefindMetricsfindMetrics(expansions: "componentType,categories", page: 0, limit: 200)
# Filter locally by name. Key IDs: metrics/visits, metrics/revenue, metrics/orders, metrics/bouncerate"I'll compare these 3 segments across 5 metrics. This requires 16 report calls (3 segments × 5 metrics + 1 sizing call). OK to proceed?"
metrics/visitsmetrics/visitsrunReport(
dimensionId: "variables/page",
metricIds: "metrics/visits",
startDate: "<start>",
endDate: "<end>",
limit: 1
)
# allVisitorVisits = summaryData.totals[0]runReport(
dimensionId: "variables/page",
metricIds: "metrics/visits",
segmentIds: "<segmentId>",
startDate: "<start>",
endDate: "<end>",
limit: 1
)
# segmentVisits = summaryData.totals[0]; shareOfTotal = segmentVisits / allVisitorVisits × 100Reuse these results ifis already a comparison metric.metrics/visits
runReport(
dimensionId: "variables/page",
metricIds: "<metricId>", # note: "metricIds" not "metricId"
segmentIds: "<segmentId>", # note: "segmentIds" not "segmentId"
startDate: "<start>",
endDate: "<end>",
limit: 1
)
# Total = summaryData.totals[0]Read totals from(notsummaryData.totals[0]).rows[]is required — use any dimension withdimensionIdfor aggregate totals. Segment IDs are the rawlimit: 1field fromid.findSegments
| Computed Value | Formula |
|---|---|
| Segment value | Raw from |
| Winner | Segment with the best value for this metric |
| Loser | Segment with the worst value for this metric |
| Spread | (max − min) / max × 100 |
| Significant? | |
/tmp/aa_segment_comparator_report_<YYYY-MM-DD_HHMMSS>.htmltemplate.html{PLACEHOLDER}{ORG_NAME}{DATE_RANGE}{REPORT_SUITE}{GENERATED_DATE}{SEGMENT_NAMES_SUMMARY}{SEGMENT_NAME}{COLOR}{VISITOR_COUNT}{NUM_SEGMENTS}{NUM_METRICS}{NUM_SIGNIFICANT}{OVERALL_WINNER}{METRIC_NAME}{VALUE}{WINNER_SEGMENT}{SPREAD}{INSIGHT_TEXT}cell-winnercell-loser/tmp/aa_segment_comparator_report_<YYYY-MM-DD_HHMMSS>.htmlopen /tmp/aa_segment_comparator_report_<YYYY-MM-DD_HHMMSS>.htmlSegment Comparison — [Date Range] | Report Suite: [Name]
Segment Context: Mobile 48,200 visits (38.7%) Desktop 72,400 (58.2%)
Mobile Desktop Winner Spread
──────────────── ─────── ──────── ───────── ──────
Visits 48,200 72,400 Desktop 33%
Bounce Rate 61.4% 40.1% ✓ Desktop 35% ✦
Conversion Rate 1.2% 3.1% ✓ Desktop 61% ✦
Revenue $9,400 $31,200 Desktop 70% ✦
✦ = spread > 10% ✓ = winner
Key findings:
- Desktop converts 2.6× better (3.1% vs 1.2%). Prioritize mobile checkout.
- Paid Search (not shown) has highest CVR at 4.8% — most efficient channel."Compare our mobile and desktop visitors on conversion metrics."