linktree-core-workflow-b
Execute Linktree secondary workflow: Analytics & Insights. Trigger: "linktree analytics & insights", "secondary linktree workflow".
What this skill does
# Linktree — Analytics & Reporting
## Overview
Pull click tracking data, measure conversion rates, and extract audience insights from
your Linktree profile. Use this workflow when you need to understand which links drive
traffic, where your audience comes from, and how engagement trends over time. This is
the secondary workflow — for link creation and profile management, see
`linktree-core-workflow-a`.
## Instructions
### Step 1: Fetch Overall Profile Analytics
```typescript
const analytics = await client.analytics.get({
profile_id: profile.id,
period: 'last_30_days',
granularity: 'daily',
});
console.log(`Total views: ${analytics.views}`);
console.log(`Total clicks: ${analytics.clicks}`);
console.log(`CTR: ${(analytics.clicks / analytics.views * 100).toFixed(1)}%`);
analytics.daily.forEach(d =>
console.log(` ${d.date}: ${d.views} views, ${d.clicks} clicks`)
);
```
### Step 2: Rank Per-Link Performance
```typescript
const linkStats = await client.analytics.byLink({
profile_id: profile.id,
period: 'last_7_days',
sort: 'clicks_desc',
});
linkStats.forEach((s, i) =>
console.log(`#${i + 1} ${s.title}: ${s.clicks} clicks (${s.unique_visitors} unique, CTR ${s.ctr}%)`)
);
```
### Step 3: Pull Audience Demographics
```typescript
const audience = await client.analytics.audience({
profile_id: profile.id,
period: 'last_30_days',
});
console.log('Top locations:', audience.locations.slice(0, 5).map(l => `${l.country}: ${l.pct}%`));
console.log('Top referrers:', audience.referrers.slice(0, 5).map(r => `${r.source}: ${r.visits}`));
console.log('Devices:', `Mobile ${audience.devices.mobile}% / Desktop ${audience.devices.desktop}%`);
```
### Step 4: Generate a Conversion Report
```typescript
const report = await client.analytics.report({
profile_id: profile.id,
period: 'last_30_days',
metrics: ['views', 'clicks', 'ctr', 'unique_visitors', 'top_referrers'],
format: 'json',
});
console.log(`Report period: ${report.start_date} to ${report.end_date}`);
console.log(`Highest CTR link: ${report.top_link.title} (${report.top_link.ctr}%)`);
console.log(`Total unique visitors: ${report.unique_visitors}`);
```
## Error Handling
| Issue | Cause | Fix |
|-------|-------|-----|
| `401 Unauthorized` | Expired or invalid bearer token | Re-authenticate via OAuth flow |
| `403 Analytics unavailable` | Free-tier profile without analytics | Upgrade to Pro plan for analytics access |
| `404 Profile not found` | Wrong profile_id | Verify with `client.profiles.list()` |
| `422 Invalid period` | Unsupported date range format | Use `last_7_days`, `last_30_days`, or ISO dates |
| Empty daily array | Profile has zero traffic in range | Widen the date range or verify profile is published |
## Output
A successful workflow produces daily view/click time series, a ranked list of link
performance with CTR, audience demographics broken down by location, referrer, and
device type, and a summary conversion report identifying top-performing links.
## Resources
- [Linktree Developer Docs](https://linktr.ee/marketplace/developer)
## Next Steps
See `linktree-sdk-patterns` for OAuth setup and rate-limit handling.
Related in Data & Analytics
clawarr-suite
IncludedComprehensive management for self-hosted media stacks (Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Bazarr, Overseerr, Plex, Tautulli, SABnzbd, Recyclarr, Unpackerr, Notifiarr, Maintainerr, Kometa, FlareSolverr). Deep library exploration, analytics, dashboard generation, content management, request handling, subtitle management, indexer control, download monitoring, quality profile sync, library cleanup automation, notification routing, collection/overlay management, and media tracker integration (Trakt, Letterboxd, Simkl).
querying-soql
IncludedSOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
habit-flow
IncludedAI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching. Use for creating habits, logging completions naturally ("I meditated today"), viewing progress, and getting personalized coaching.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
visualizing-data
IncludedBuilds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.