Google Search Console
Import daily web search metrics and identify ranking opportunities for a site.
Connect a property
Apply migration 0016_search_console.sql when upgrading an existing Worker
deployment. The Node portal applies its migrations at startup.
- Enable the Search Console API in the Google Cloud project. Create a service account and grant its email access to the property in Search Console. Trackr requests the read-only scope. Google authorization guide
- Set
GSC_ENCRYPTION_KEYon the Trackr portal to a base64-encoded 32-byte key. For example, generate a key withopenssl rand -base64 32and store it with your deployment secrets. Pass it as an environment variable to Node or Docker Compose. On Workers, add it as a Worker secret usingpnpm --filter @trackr/dashboard exec wrangler secret put GSC_ENCRYPTION_KEY. - In the site’s Google Search Console section in Admin, enter the exact
property, such as
sc-domain:example.comorhttps://www.example.com/. Upload the service-account JSON, save, then use Sync now. Trackr encrypts the credential before storing it. To replace a service account, upload its new JSON in the same form.
The optional start day sets how far back to import. The default covers three eligible days for the first sync. Each run imports at most seven days and continues from the last completed day if it falls behind. Once caught up, the sync refreshes the last three eligible days. The latest eligible day is three calendar days before today in Pacific Time. Disabling sync pauses ingestion while keeping the imported reports.
Search terms and ranking opportunities
The report shows clicks, impressions, click-through rate and the impression-weighted average position. Trackr uses Google’s property totals for the overview and keeps query and page rows separately. Google ranks and limits detailed rows and can omit some search terms, so detail totals can differ from property totals. Google performance data guide
Query types are brand, regional, commercial, informational and
other. Defaults include the site’s domain label as a brand term and common
German regional, service and informational terms. Use GET /api/admin/sites/:id/rules
and PATCH /api/admin/sites/:id/rules to update the site rules. Keep the existing
rule arrays in the PATCH body and add or replace these fields:
{
"query_types": [
{ "type": "brand", "terms": ["acme", "acme studio"], "priority": 40 },
{ "type": "regional", "terms": ["hamburg"], "priority": 30 },
{ "type": "commercial", "terms": ["webdesign", "beratung"], "priority": 20 },
{ "type": "informational", "terms": ["anleitung", "vergleich"], "priority": 10 }
],
"seo_thresholds": {
"potential_impressions": 50,
"quick_win_impressions": 100
}
}
A higher priority wins. Terms match whole words or phrases, ignoring case and accents. The sync classifies each imported day with the site’s active rules. For a query appearing on several selected days, the report uses its latest classification in that date range.
SEO potential includes queries with an average position of 4–20 and at least 50 impressions by default. Quick wins use 4–15 and at least 100 impressions. Both impression thresholds can be set per site.
SEO API
GET /api/seo/:siteId returns the overview, daily time series, top queries,
top pages, query types, SEO potential and quick wins. It requires a signed-in
administrator or a viewer assigned to the site, including for demo sites.
fromandtoare inclusive dates. UseYYYY-MM-DDfor Search Console’s Pacific calendar days. Millisecond inputs use the UTC calendar date as the report date.compare=previous|yearadds the comparison period and relative changes using the same weekday alignment as the other Trackr reports.limitsets the number of rows per ranking, from 1 to 100. The default is 20.country(for exampledeu) anddevice(DESKTOP,MOBILE,TABLET) filter query-derived metrics.hostfilters page rows. The overview and time series always use property totals.
The portal keeps each completed daily import after Trackr’s visitor-event retention. Search Console data sets are scoped to their site and property. Trackr stores aggregate search performance without joining it to individual visitor sessions.