Skill: djedi/clicky-analytics (version 1.2.0)

--- name: clicky-analytics description: Fetch website analytics from Clicky (clicky.com) via their REST API. Use when the user asks about website traffic, visitors, pageviews, top pages, bounce rate, search rankings, traffic sources, countries, or any Clicky analytics data. Also use for scheduled analytics reports or comparing traffic across date ranges. metadata: {"openclaw":{"emoji":"📊","primaryEnv":"CLICKY_SITEKEY","requires":{"bins":["curl"],"env":["CLICKY_SITE_ID","CLICKY_SITEKEY"]}}} --- # Clicky Analytics Fetch analytics from the Clicky API. Supports multiple sites via environment variables. ## Setup Store site credentials as environment variables. Use the naming convention `CLICKY_<NAME>_SITE_ID` and `CLICKY_<NAME>_SITEKEY`: ```bash # In ~/.openclaw/.env or your shell profile CLICKY_ENVELOPEBUDGET_SITE_ID=101427673 CLICKY_ENVELOPEBUDGET_SITEKEY=c287a01cc00f70cb CLICKY_ZAPYETI_SITE_ID=99999999 CLICKY_ZAPYETI_SITEKEY=abc123def456 ``` For a single default site, use: ```bash CLICKY_SITE_ID=101427673 CLICKY_SITEKEY=c287a01cc00f70cb ``` ## Usage ```bash # Named site (reads CLICKY_<NAME>_SITE_ID and CLICKY_<NAME>_SITEKEY env vars) scripts/clicky.sh envelopebudget visitors,actions-pageviews # Default site (reads CLICKY_SITE_ID and CLICKY_SITEKEY env vars) scripts/clicky.sh default visitors,actions-pageviews # With options scripts/clicky.sh envelopebudget pages --date last-7-days --limit 20 scripts/clicky.sh envelopebudget visitors --date 2026-03-01,2026-03-13 --daily ``` ### Options - `--date DATE` — today, yesterday, last-7-days, last-30-days, YYYY-MM-DD, or range YYYY-MM-DD,YYYY-MM-DD - `--limit N` — max results (default 50, max 1000) - `--daily` — break results down by day - `--page N` — paginate through results ### Combine types in one request Use commas: `visitors,visitors-unique,actions-pageviews,bounce-rate,time-average-pretty` ## Common Reports | Report | Types | |--------|-------| | Overview | `visitors,visitors-unique,actions-pageviews,bounce-rate,time-average-pretty` | | Content | `pages,pages-entrance,pages-exit` | | Traffic | `traffic-sources,links-domains,searches,countries` | | SEO | `searches,searches-rankings,searches-keywords` | ## API Reference See `references/api-types.md` for all available data types, date formats, and limits.

path: references/api-types.md
content: # Clicky API Data Types

Request multiple types in one call: `type=visitors,countries,searches`

## Popular Items (ordered by frequency)
- `pages` — top pages
- `pages-entrance` — landing pages
- `pages-exit` — exit pages
- `downloads` — file downloads
- `events` — JS events
- `links` — incoming links (full URL)
- `links-domains` — incoming links (by domain)
- `links-outbound` — outbound links
- `searches` — search queries
- `searches-keywords` — individual keywords
- `searches-engines` — search engines
- `searches-rankings` — Google rankings (best→worst)
- `countries` — by country
- `cities` — by city
- `regions` — by region
- `languages` — by language
- `web-browsers` — by browser
- `operating-systems` — by OS
- `screen-resolutions` — by resolution
- `hardware` — mobile devices
- `traffic-sources` — how visitors arrive (link/search/email/etc)
- `goals` — goal completions
- `campaigns` — campaign tracking
- `engagement-actions` — by actions performed
- `engagement-times` — by time on site

## Chronological Items (newest→oldest)
- `visitors-list` — visitor details (filter by ip_address or uid)
- `actions-list` — visitor actions (filter by session_id)
- `searches-recent` — recent search referrals
- `links-recent` — recent link referrals

## Tallies (counts/averages)
- `visitors` — visitor count
- `visitors-online` — currently active (always live)
- `visitors-unique` — unique visitors
- `visitors-new` — first-time visitors
- `actions` — total actions (pageviews + downloads + outbound)
- `actions-pageviews` — pageview count
- `actions-average` — avg actions per visitor
- `time-average` — avg time on site (seconds)
- `time-average-pretty` — avg time (formatted: 3m 10s)
- `time-total-pretty` — total time (formatted: 6d 19h 5m)
- `bounce-rate` — bounce rate percentage

## Date Formats
- `today`, `yesterday`, `last-7-days`, `last-30-days`
- `YYYY-MM-DD` — specific date
- `YYYY-MM-DD,YYYY-MM-DD` — date range (max 31 days, 366 for Pro)

## Limits
- Default: 50, max: 1000 (use `page` param to paginate)
- visitors-list/actions-list: max 31-day range, max 1000 items


path: scripts/clicky.sh
content: #!/usr/bin/env bash
# clicky.sh — Fetch analytics from Clicky API
# Usage: clicky.sh <site_name> <type> [options]
# Credentials read from env: CLICKY_<NAME>_SITE_ID + CLICKY_<NAME>_SITEKEY
# Or for default: CLICKY_SITE_ID + CLICKY_SITEKEY
set -euo pipefail

API_URL="https://api.clicky.com/api/stats/4"

SITE_NAME="${1:?Usage: clicky.sh <site_name> <type> [--date DATE] [--limit N] [--daily]}"
shift

# Resolve credentials from environment
UPPER_NAME=$(echo "$SITE_NAME" | tr '[:lower:]' '[:upper:]' | tr '-' '_')

if [[ "$UPPER_NAME" == "DEFAULT" ]]; then
  SITE_ID="${CLICKY_SITE_ID:?Set CLICKY_SITE_ID env var}"
  SITEKEY="${CLICKY_SITEKEY:?Set CLICKY_SITEKEY env var}"
else
  ID_VAR="CLICKY_${UPPER_NAME}_SITE_ID"
  KEY_VAR="CLICKY_${UPPER_NAME}_SITEKEY"
  SITE_ID="${!ID_VAR:-}"
  SITEKEY="${!KEY_VAR:-}"

  # Fall back to default if named vars not found
  if [[ -z "$SITE_ID" || -z "$SITEKEY" ]]; then
    echo "Error: Set ${ID_VAR} and ${KEY_VAR} environment variables" >&2
    echo "Or use CLICKY_SITE_ID and CLICKY_SITEKEY for a default site" >&2
    exit 1
  fi
fi

TYPE="${1:?Missing type (e.g. visitors,pages,countries)}"
shift

DATE="today"
LIMIT="50"
DAILY=""
OUTPUT="json"
PAGE=""

while [[ $# -gt 0 ]]; do
  case "$1" in
    --date)    DATE="$2"; shift 2 ;;
    --limit)   LIMIT="$2"; shift 2 ;;
    --daily)   DAILY="1"; shift ;;
    --output)  OUTPUT="$2"; shift 2 ;;
    --page)    PAGE="$2"; shift 2 ;;
    *) echo "Unknown option: $1" >&2; exit 1 ;;
  esac
done

URL="${API_URL}?site_id=${SITE_ID}&sitekey=${SITEKEY}&type=${TYPE}&date=${DATE}&limit=${LIMIT}&output=${OUTPUT}"
[[ -n "$DAILY" ]] && URL="${URL}&daily=1"
[[ -n "$PAGE" ]] && URL="${URL}&page=${PAGE}"

curl -s "$URL"


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)