Connect Google Search Console with your own Google OAuth app (Direct method)

Available on:
Free
Premium
Marketing Add-on

Use this guide to connect Google Search Console (GSC) to WP Statistics using credentials from your own Google Cloud project. This is helpful if your company requires using an internal Google app or you want full control over the integration.

Before you start

You will need:

Privacy

Your Client ID, Client Secret, and access tokens are stored only on your site. Clicking Disconnect removes the tokens.

Step 1: Choose the connection method in WP Statistics

Go to WP Admin → WP Statistics → Settings → Google Search Console.

The Connect button stays disabled until Client ID and Client Secret are saved.

Step 2: Create or select a Google Cloud project

  1. Open Google Cloud Console.
  2. Create a new project or select an existing one used for your site.

Step 3: Enable the APIs

  1. In Google Cloud, go to APIs & Services → Library.
  2. Enable Search Console API.

Step 4: Configure the OAuth consent screen

  1. Go to APIs & Services → OAuth consent screen.
  2. In the App Information section, fill in the App name and user support email.
  3. In the Audience section, select either External or Internal, depending on your account type.
  4. Under the Contact Information section, add your email addresses.
  5. Agree to the terms and conditions and click on the Create button.

Step 5: Select the required scopes

  1. Go to APIs & Services → OAuth consent screen → Data Access.
  2. Click on the Add or remove scopes button
  3. Select the the following scope, or add it using the Manually add scopes section input:
https://www.googleapis.com/auth/webmasters.readonly

Save and continue.

If the app is in Testing mode, go to APIs & Services → OAuth consent screen → Audience and add your Google account under Test users.

Step 6: Create OAuth credentials

  1. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID.
  2. Application type: Web application.
  3. Give it a clear name, for example WP Statistics GSC.
  4. Under Authorized redirect URIs, add the exact URL shown in your WP Statistics settings in the Authorized Redirect URI field.
    • Use the exact value from your site.
    • For production sites, use HTTPS.
  5. Click Create.
  6. Copy the Client ID and Client Secret.

Step 7: Add the credentials to WP Statistics

  1. Back in WordPress, open WP Statistics → Settings → Google Search Console.
  2. Google Client ID: Client ID from your Google Cloud OAuth app.
  3. Google Client Secret: Client Secret from the same OAuth app.
  4. Click Save changes.

The Connect to Google Search Console button becomes enabled after saving valid values.

Step 8: Connect and grant access

  1. Click Connect to Google Search Console.
  2. Google opens a consent screen. Approve access for the account that has permission on your property.
  3. You return to WordPress. The connection is now active.

Step 9: Choose your property and start using reports

Open the GSC tab in WP Statistics and choose the property you want to use. Data will appear in your reports after the first successful sync.

Video walkthrough

Field reference in WP Statistics

Troubleshooting

redirect_uri_mismatch

The Redirect URI in Google Cloud does not match the value shown in WP Statistics. Edit your OAuth client and add the exact URI from settings. Save, wait a minute, and try again.

invalid_client or unauthorized_client

Client ID or Secret is wrong, deleted, or from another project. Create a new OAuth client or update the values in WordPress and save.

access_denied

You closed the Google consent screen or denied access. Try again and approve.

insufficient permissions or empty property list

Make sure the Google account you used has Owner or Full permission on the target GSC property. Add your account in Search Console if needed.

App in Testing mode

Add your Google account under Test users on the OAuth consent screen, or publish the app to production.

Local or staging sites

Google allows http://localhost for testing. For other hosts use HTTPS and add the exact Redirect URI.

Security best practices

FAQ

Can I switch between connection methods later

Yes. You can switch from Direct to WP Statistics Credentials and back. If you switch, you may need to reconnect.

Do I need Owner permission in Search Console

Owner or Full user permission is recommended to read performance data through the API.

What scopes does WP Statistics request

Only the read-only Search Console scope: webmasters.readonly.

Where are tokens stored

On your site database. Disconnect removes them.

Let’s get started
Take your business to next level

Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.