Google integration
GOOGLE_OAUTH_CLIENT_ID=…apps.googleusercontent.com GOOGLE_OAUTH_CLIENT_SECRET=GOCSPX-…You still create the Google Cloud OAuth client once — but every user of this instance benefits from it without doing the setup themselves.
Why connect Google?
- Real keyword rankings from Google itself — not scraped, not estimated.
- Quick wins finder — keywords sitting at positions 4-15, one tweak away from page 1.
- Content decay detector — pages losing traffic, ranked by recovery value.
- Real monthly reports — actual traffic charts in PDFs instead of placeholder data.
- Page-level health — indexability + CTR per URL straight from GSC.
- Free, forever— 25,000 GSC queries/day + 50,000 GA4 tokens/day. You won't hit them.
Quickest way: a service account (~2 minutes, no browser sign-in)
A service account is a Google login that belongs to software rather than a person. You create one, paste its key below, then add its email address as a user on your Search Console property exactly as you would invite a colleague.
This skips the consent screen, the redirect URL and the “unverified app” warning below. It also avoids the trap in step 3: an app left unpublished gets a token that stops working after seven days, with nothing to say why.
- In Service Accounts, click Create service account. Any name. Skip the optional permission steps.
- Open it, go to Keys, then Add key, Create new key, JSON. A file downloads.
- Enable the Search Console API and, for traffic data, the Analytics Data API.
- Paste the file below, then add the email it shows you.
Full OAuth setup (~5 minutes) — needed only for Business Profile, Gmail, or per-client accounts
- 1
Create a Google Cloud project
Open the Google Cloud Console and create a project (any name — “SEO Tool” works). Free, no credit card.
- 2
Enable two APIs
In your project, enable these (click each, hit “Enable”):
- · Search Console API
- · Google Analytics Data API
- · Google Analytics Admin API (so we can list your GA4 properties)
- 3
Configure the OAuth consent screen
In APIs & Services → OAuth consent screen:
- · User Type: External
- · App name: anything (e.g. “My SEO Tool”)
- · User support email: yourself
- · Add yourself under Test users
- · Then press Publish app and confirm.
Publishing matters more than it sounds. Google gives apps left in Testing a refresh token that expires after 7 days — so the connection works, then quietly stops about a week later and has to be redone. Publishing is what makes it permanent.
You will see an “unverified app” warning when you sign in. That is expected and fine here: it is your own app, in your own Google account, used only by you. Verification only exists to remove that screen for strangers. Click Advanced → Go to … (unsafe) to continue. - 4
Create an OAuth Client ID
Go to APIs & Services → Credentials, click Create Credentials → OAuth client ID:
- · Application type: Web application
- · Name: anything
- · Under Authorized redirect URIs, paste this exact URL:
https://app-dev.truscaler.com/api/google/callbackselectWhen you click “Create”, Google shows you a Client ID and Client Secret. Copy both — you'll paste them in step 5.
- 5
Paste your Client ID + Secret here
- 6
Connect your Google account
Save your Client ID + Secret in step 5 first.
- 7
Pick properties per client
On each client's detail page, you'll see dropdowns to pick the matching GSC property + GA4 property. Skippable — you can connect later.