Skip to content

[Feature]: Multiple Google Search Console connections per team #482

Open

Description

@pablolopez-domatix

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_id instead of team_id alone).
  • 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

  1. Team admin opens Search Console settings and clicks "Connect another Google account".
  2. The property list shows properties from all connected accounts, labelled with the account email.
  3. 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

  1. PascaleBeier commented on Nov 17, 2026

    @PascaleBeier
    Collaborator

    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?

  2. pablolopez-domatix commented on Dec 2, 2026

    @pablolopez-domatix
    Author

    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):

    captura-menu-anonima
    • An "All teams" entry in the team switcher, read-only, listing the sites of every team you belong to.
    • Sites grouped by team, each group with a link to switch to that team.
    • "Open dashboard" on a site from another team switches the active team, since the other pages stay single-team.

    These are only our assumptions. How would you prefer it? In particular:

    1. Should "all teams" be an option in the switcher, a toggle on the overview, or the overview's default?
    2. Is switching the active team when opening a site from another team OK, or would you handle it differently?

    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.

  3. PascaleBeier commented on Dec 2, 2026

    @PascaleBeier
    Collaborator

    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:

    1. The Overview page groups all teams I belong to and shows their sites below
    2. Is switching the active team when opening a site from another team OK, or would you handle it differently? - Yes, I'd suggest exactly that
    3. We can extend the site selector itself to show all site I have access to and group them by team using https://optimus.openng.org/select#group - because I find myself being confused on where the hell I put a certain site :D

    Happy to review a PR for this, I hope this helps you, I know, a lot of cloud customers would be happy about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions