indexgap ctr-gap

command

Snippets that get fewer clicks than the site's own curve.

Reads a performance export and builds the site's own CTR curve: the median CTR per position bucket 1, 2, 3, 4–5 and 6–10, with a note on every bucket that has too few rows. Accepted inputs: the Search Console export (the zip, the xlsx, or Queries.csv and Pages.csv, with headers in the console's language, Russian included), a CSV in the API's shape date,page,query,clicks,impressions,ctr,position, and the Ahrefs API reports gsc-pages, gsc-keywords and gsc-ctr-by-position as JSON or CSV with the field names from the API documentation (the last one is printed next to the curve as a mean and never used for findings). Rows at or above --min-impressions whose CTR is below their bucket's median become ctr-below-curve, with missed clicks labelled as a model; rows whose results page has an AI Overview (--serp, or a serp_features column) become aio-present instead. --serp also reads a DataForSEO SERP API response for Google Organic (live/advanced or task_get/advanced: tasks[].result[] with keyword and items[].type organic and ai_overview, as documented by DataForSEO); a DataForSEO file whose results it cannot find is an error that names the fields it saw. ctr_targets.csv lists URL, query, the current title and description read from the build (--dir and --site, or indexgap.json), position, bucket, gap and the modelled loss. --compare DATE prints two equal windows, --window days before the date and the same number from it (14 and 14 by default), with both date ranges; if the export does not cover both windows completely the command refuses instead of comparing unequal periods. Nothing touches the network, and the package never suggests click inflation or CTR-manipulation services. Rows are parsed by indexgap/gsc.py, which other commands can share. With the build, it also prints demand without a page: the queries sorted into intent classes (pricing, X vs Y, alternatives, best-of, integrations, how-to…) and the classes with impressions and no page type that serves them (see the traffic guide).

Usage

usage: indexgap ctr-gap [-h] [--dir DIR] [--site SITE] [--config CONFIG]
                        [--serp serp.csv] [--min-impressions MIN_IMPRESSIONS]
                        [--min-rows MIN_ROWS] [--compare YYYY-MM-DD]
                        [--window WINDOW] [--positions [topvisor=]FILE]
                        [--targets TARGETS] [--out ctr-gap.json]
                        gsc.csv [gsc.csv ...]

positional arguments:
  gsc.csv               a performance export: Search Console export (zip, xlsx
                        or Queries.csv/Pages.csv, in any console language),
                        CSV date,page,query,clicks,impressions,ctr,position,
                        or Ahrefs gsc-pages, gsc-keywords, gsc-ctr-by-position
                        as JSON/CSV

options:
  -h, --help            show this help message and exit
  --dir DIR             the build directory: current titles and descriptions
                        are read from it; defaults to indexgap.json
  --site SITE           the full site address; taken from indexgap.json by
                        default
  --config CONFIG       path to indexgap.json; looked for next to the pages by
                        default
  --serp serp.csv       a results-page export with an AI Overview flag: a
                        serp_features column (value ai_overview, as in Ahrefs)
                        or an ai_overview yes/no column and a query column; or
                        DataForSEO SERP API JSON (Google Organic, items of
                        type organic and ai_overview)
  --min-impressions MIN_IMPRESSIONS
                        impressions threshold for the ctr-below-curve finding
                        (default 100)
  --min-rows MIN_ROWS   how many rows a position bucket needs for its median
                        to count (default 5)
  --compare YYYY-MM-DD  compare the window before the date with the window
                        starting on it; the windows are equal and complete, or
                        the command refuses
  --window WINDOW       length of each --compare window in days (default 14)
  --positions [topvisor=]FILE
                        a rank-tracker export: position bands with demand,
                        keywords close to the top and without a position,
                        tracker URLs missing from the build and top-20
                        keywords without Search Console impressions; it does
                        not enter the CTR curve
  --targets TARGETS     where to write the snippet targets; an empty string
                        writes nothing
  --out ctr-gap.json    also write the data as JSON

The rest of the pipeline

← cite · integrations →