Repository navigation
Description
Summary
Allow more than one Google Search Console connection per team, so each site can sync from the Google account that actually owns its property.
Problem
Today a team has a single Search Console connection (google_search_console_connections uses team_id as primary key). Every site in the team has to be mapped to a property visible to that one Google account. Connecting a different Google account overwrites the existing connection (ON CONFLICT (team_id) DO UPDATE in database/store_google_search_console.go), so sites already mapped to properties of the previous account stop syncing, and mapping a property the new account can't see fails with "Google Search Console property is not available for this team".
We are an agency running a self-hosted HitKeep for several clients. Each client owns their own Search Console property under their own Google account. To make it work with one connection per team, every client has to grant access to the same Google account of ours, so a single account ends up holding read access to all client properties. Some clients would rather connect their own account (or a dedicated one per client) than add a shared third-party account.
The workaround is one team per client and moving sites with POST /api/sites/{id}/transfer-team. It works, but it splits dashboards, members and settings just to get a different Google account, and the transfer drops the existing GSC mapping.
Who Benefits
Agencies and team admins who manage sites for several owners in one team.
Proposed Solution
Smallest version I can think of:
- Let a team hold several Google connections (key by
team_id+google_account_idinstead ofteam_idalone). - When mapping a site to a property, store which connection it uses.
- The sync worker uses the connection of each site mapping.
- The existing single connection keeps working unchanged (migrated as the team's first connection).
User Workflow
- Team admin opens Search Console settings and clicks "Connect another Google account".
- The property list shows properties from all connected accounts, labelled with the account email.
- Admin maps each site to a property; sync uses the matching account.
Success Criteria
- A team can connect at least two Google accounts and map different sites to properties from each.
- Disconnecting one account only affects the sites mapped through it.
- Existing installs keep their current connection and mappings without manual steps.
Alternatives Considered
- One team per client +
transfer-team(works today, see above). - One shared Google account added to every client property (works, but that's what clients push back on).
Constraints
Migration of the existing google_search_console_connections and google_search_console_site_mappings tables; no change for single-account setups.
Additional Context
Builds on #140 / #141. Before writing any code: would you accept a PR along these lines, or do you prefer to keep one connection per team? If you'd take it, I'm happy to follow whatever shape you prefer (per team with several accounts, or per site).
Activity
PascaleBeier commentedon Nov 17, 2026
Hey, thanks a lot !
I'm a bit conflicted here because that's the idea that data is physically separated in teams. You are meant to add clients as separate teams because of the data boundary.
I'd rather investigate if we could combine the overview to show all sites from all teams I have access to.
What is your understanding of multi-tenancy here? Why would a team have multiple Google search console connections?
Also, this can be solved in Google itself by delegating access to these properties to each other, maybe that helps?
pablolopez-domatix commentedon Dec 2, 2026
Sorry for the late reply, and thanks, that makes sense. Keeping the team as the data boundary is cleaner than mixing accounts inside one team.
To answer your question: we only put all the sites in one team so we could see them together on the overview. Each client owning its Search Console property fits one team per client perfectly, as long as we don't lose that combined view.
So a cross-team overview would solve our case. Here is a quick mockup of how we pictured it (sites regrouped as if each client had its own team):
These are only our assumptions. How would you prefer it? In particular:
If you're open to it, I'd send a PR following whatever shape you prefer. Feel free to close this issue or repurpose it for the overview.
PascaleBeier commentedon Dec 2, 2026
Hey @pablolopez-domatix -
It is not possible (and has a lot of implications) to provide a general "all teams" option in the switcher. The HitKeep Dashboard and product is designed around always having exactly one active team.
What I suggest for a middle ground is:
Happy to review a PR for this, I hope this helps you, I know, a lot of cloud customers would be happy about that.