Skip to content
Agentmart
Submit a tool

page-events-analysis

Cross-reference page views with event usage to calculate feature adoption rates.

Skill by lucaspretti

IndexedMIT
Write a review

Chalk Labs

Need help deploying page-events-analysis?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lucaspretti-page-events-analysis

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Cross-reference page views with event usage to calculate feature adoption rates. Use this when the user wants to know how many visitors used a specific feature (event) on a set of pages matching a URL pattern.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/page-events-analysis

What's inside

Skill name
page-events-analysis
Description
Cross-reference page views with event usage to calculate feature adoption rates. Use this when the user wants to know how many visitors used a specific feature (event) on a set of pages matching a URL pattern.
License
MIT
Instructions
93 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Page Events Analysis

Analyze page views and events for specific URL patterns, then cross-reference them to calculate usage rates. This answers questions like "how many people used feature X on pages Y".

## Gather Parameters

Ask the user for (or infer from context):

1. **Site ID** - the Matomo site to query
2. **URL pattern** - regex to filter pages (e.g. `guidelines-epc|guidelines-pct`)
3. **Event filter** - the event name or action to cross-reference (e.g. `Toggle Show Modifications`)
4. **Date range** - start and end dates (default: last 30 days from today)
5. **Device filter** (optional) - `desktop`, `mobile`, `smartphone`, `tablet`, or `phablet` if the user asks about a specific device slice (e.g. "how many mobile users toggled X")

## Execution Steps

### 1. Fetch page views

Call `matomo_search_pages` with:
- `siteId`: the site ID
- `urlPattern`: the URL pattern
- `period`: `range` when the user gave start/end dates, otherwise `month` for long windows and `day` for short ones
- `date`: comma-separated start,end range when `period=range` (e.g. `2026-02-01,2026-02-28`)
- `device`: pass through if the user asked for a device slice

Sum up `nb_visits` (unique visitors) and `nb_hits` (page views) across all matching pages. Keep monthly totals if the range spans multiple months.

### 2. Fetch event counts

Call `matomo_search_events` with:
- `siteId`: the site ID
- `filterPattern`: the event filter
- `dimension`: `name` (to see specific event values like on/off toggles)
- `period`, `date`, `device`: same as above

Sum up `nb_events` across all matching events. Keep monthly totals.

### 3. Calculate usage rate

```
usage_rate = (total_events / total_page_views) * 100
```

If both on/off event variants exist (e.g. "Toggle Show Modifications On" and "Toggle Show Modifications Off"), report them separately and combined.

### 4. Present findings

Provide a summary with:

**Key figures:**
- Total page views (hits) and unique visitors
- Total events (broken down by variant if applicable)
- Overall usage rate %

**Monthly breakdown table:**

| Month | Page Views | Unique Visitors | Events | Usage Rate |
|-------|-----------|-----------------|--------|------------|
| ...   | ...       | ...             | ...    | ...        |
| **Total** | **...** | **...** | **...** | **...%** |

**Observations:**
- Note any trends (increasing/decreasing adoption)
- Flag months with unusual spikes or drops
- If usage rate is very low or very high, call it out

## Fallback when segments return zero

If a `device`-filtered call comes back with all-zero metrics while the same
query without `device` returns normal numbers, the Matomo server is refusing
to aggregate the segment for this API token (it lacks `process_new_segment`
or the segment isn't pre-archived). Do not claim "no mobile traffic" — that's
almost never the real answer.

Try these in order:

1. **Switch to `matomo_count_visits_by_segment`.** It uses the Live API
   under the hood (no archiving required) and accepts the same `device`
   shortcut plus an optional `urlPattern` for the page filter. For per-URL
   mobile slicing:
   `{siteId, period, date, device: "mobile", urlPattern: "bulletin/download"}`
   Returns `{visits, byDevice, byCountryTop10, actionHitsOnPattern}`.
   For per-language breakdown, call `matomo_get_last_visits` with the same
   segment and iterate `actionDetails[].url` client-side (strip ISO lang
   prefix with regex `/^/([a-z]{2})/...`).
2. **Check `matomo_list_segments`** to find saved segments on the instance.
   Any segment with `auto_archive=1` is pre-archived and will always return
   real numbers when you reference its `definition` string in `segment`.
3. **Open the Matomo UI in a logged-in browser session** as a last resort.
4. **Longer-term fix**: ask the Matomo admin to grant
   `process_new_segment` on the token or pre-archive common segments.

From lucaspretti/matomo-mcp-client, MIT.

Signals

Stars
0
Forks
0
Open issues
5
Last commit (this folder)
Apr 24, 2026 (6 months ago)
Last release
Oct 6, 2026 (24 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from lucaspretti

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get page-events-analysis running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying page-events-analysis?

CallGet help
Cite this page

page-events-analysis skill. Agent Mart. https://agentmart.dev/skills/lucaspretti-page-events-analysis (last updated 2026-10-24)