Add the OAuth details to your website

STEP-BY-STEP
  • 1
  • 2
    On the right side of the window, click the Settings icon
  • 3
    Tick the box for Use your own OAuth credentials
  • 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
    Enter the copied Client ID and Client Secret in the corresponding fields, then click Close at the bottom
    Google Analytics

Step 1: Select and Authorize APIs

STEP-BY-STEP
  • 1
    Search for "Google Analytics API v3" using the scroll. Click all the options under it, then click on the Authorize APIs button after the selection
    Google Analytics
  • 2
    Accept all the permissions asked by Google
  • 3
    If you get any Authorisation Errors, please make sure your Gmail account has been added to Test users
    Google Analytics

Step 2: Exchange Authorization code for tokens

STEP-BY-STEP
  • 1
    Now in Step 2 on the left side panel. Click "Exchange Authorization code for tokens"
    Google Analytics
  • 2
    Click on Auto-refresh the token before it expires.
  • 3
    Copy the Refresh token generated
    Google Analytics