Follow the next steps to authorize your WordPress website with Google Analytics, create client ID and client secret:
- Open the Google API Console Credentials page.
- Click "Select a project", then "NEW PROJECT", and enter a name for the project, and optionally, edit the provided project ID. Click the "Create" button.
- On the Credentials page, select Create credentials, then OAuth client ID.
- You may be prompted to set a product name on the Consent screen; if so, click Configure consent screen, supply the requested information, and click Save to return to the Credentials screen.
- Select the "Desktop app" for the Application type and enter any additional information required.
- Click Create.
- On the page that appears, copy the client ID and client secret to your clipboard, as you will need them when you configure your client library.
Learn More: OAuth2 Authentication