Register for the Google OAuth Client

STEP-BY-STEP
  • 1
  • 2
    Sign in with your Google account
  • 3
    Click on the Create Project button to create a new project
  • 4
    In the pop-up window which appears, enter your project name as desired and click on Create button. Let this process run, it may take a few seconds
  • 5
    After the project is created successfully, the page reloads with some options on the left menu: Home, Marketplace, Billing, APIs & Services, Support, etc.
  • 6
    Click on the APIs & Services
    Google Analytics
  • 7
    Choose the Library tab.
    Google Analytics
  • 8
    In the search box on the top search "Analytics API", then click on "Google Analytics API".
    Google Analytics
  • 9
    Once you're on the Google Analytics API, click the "Enable" button
    Google Analytics
  • 10
    Now on the left menu, click the Credentials tab, then click Create Credentials on top, and choose OAuth Client ID.
  • 11
    Follow the details for the Credential Type form
  • 12
    OAuth Screen form details:
  • 13
    Update selected Scopes, search for the "Google Analytics API" on the filter section and select all the scopes from the results
  • 14
    If you are not on the Google Analytics API screen anymore, on the left menu, click the Credentials tab, then click Create Credentials on top, and choose OAuth Client ID.
    Google Analytics
  • 15
    Once you're on the "Create OAuth client ID" page, click the Configure Consent Screen button
    Google Analytics
  • 16
    On the OAuth Consent Screen, choose "External", then click the Create button
    Google Analytics
  • 17
    You will now be taken to the Edit App Registration page > OAuth Consent Screen
  • 18
    For the App Information, enter the following:
    • App Name - enter a name, which can be company name + "WebEd"
    • User Support Email - use the email address you created for the API (Gmail)
    Google Analytics
  • 19
    Under App Domain, enter the following:
    • Application home page
    • Application Privacy Policy link
    • Application Terms of Service link
    Google Analytics
  • 20
    Under Authorized Domains, enter the following:
    • Domain - add the domain of your site
    • Developer Contact Information - enter and add [email protected]
    • Then click the Save and Continue button
    Google Analytics
  • 21
    You will now be taken to the Edit App Registration page > Scopes
    • Click the Add or Remove Scopes button
    Google Analytics
  • 22
    A window "Update Selected Scopes" will pop up on the right
  • 23
    Click through the table rows and look for "Google Analytics API" without a lock icon
  • 24
    Once you find it, tick the box beside it, then click the Update button at the bottom of the window
    Google Analytics
  • 25
    Upon doing this, the window should close, and the Google Analytics API should now be added under "Your non-sensitive scopes"
    Google Analytics
  • 26
    Ignore "Your sensitive scopes" and " Your restricted scopes", and scroll to the bottom, click the Save and Continue button
  • 27
    You will now be taken to the Edit App Registration page > Optional Info
  • 28
    Ignore all fields here. Scroll to the bottom and click the Save and Continue button
    Google Analytics
  • 29
    You will now be taken to the Edit App Registration page > Summary screen
  • 30
    Check everything, then click the button "Back to Dashboard" at the bottom
    Google Analytics
  • 31
    Now, go back to the Credentials page, click Create Credentials, choose OAuth Client ID
  • 32
    You will now be taken to the Create OAuth client ID page
  • 33
    Enter the following information:
    • Application type - select Web application
    • Name - enter the name of the site or any preferred
    Google Analytics
  • 34
    Under Authorized JavaScript origins, add your website URL in the URIs field
  • 35
    Under Authorized redirect URIs, enter "https://developers.google.com/oauthplayground"
    Google Analytics
  • 36
    Click on the Create button. This will generate your Client ID and Client Secret
  • 37
    Once you click the Create button, the page reloads and a window with your Client ID and Client Secret information appears
    Google Analytics
  • 38
    Copy both Client ID and Client Secret and paste them into Notepad, you will need it in a minute