Google Analytics

If you are using GoogleAPIs for the first time, you will find the following display. Click "I agree .." in the Terms of Service and then click "Agree And Continue"

welcome

Click CREATE PROJECT

create project

If you’ve made a project before, click select project from the top bar menu:

select project

Click NEW PROJECT

new project
  1. Type a new project name

    1
  2. Click ENABLE APIS AND SERVICES

    2
  3. Find and select Analytics API

    3
  4. Click ENABLE

    4
  5. Click Credentials

    5
  6. Click CREATE CREDENTIALS, click Service account

    6
  7. Type Service account name, click DONE

    7
  8. Click "Manage service accounts"

    8
  9. Click Actions and select "Manage keys"

    9
  10. Click "ADD KEY" and select "Create new key"

    10
  11. Select key type "JSON"

    11
  12. The json file will be downloaded automatically and a notification "Private key saved to your computer" will appear. Click CLOSE.

    12
    Rename file name-xxxxx-xxxxx.json to service-account-credentials.json, and save in storage/app/analytics
    save credentials
  13. Go to the details tab and copy the email shown

    13
  14. Go to https://analytics.google.com/analytics/web/

    If you open Google Analytics for the first time, you will get the following screen:

    14

    If you already have an account name, select admin:

    admin

    Click "Create Account"

    create account
  15. Type in the account name and then check all data sharing options. Then click Next.

    15
  16. Type the property name and then click "Show advanced options"

    16
  17. Enable "Create a Universal Analytics property".

    17
  18. Enter the Website URL and then select "Create a Universal Analytics property only". Then click Next.

    18
  19. Set about your business, then click "Create"

    19
  20. Checklist Term of Service Agreement and cklick "I Accept".

    20
  21. Copy and save Tracking ID

    21
    Enter the Tracking ID value in the Google Analytics ID field in Settings menu > Web Config
    google analytics id
  22. Click "Property User Management"

    22
  23. Click button plus

    23
  24. Click "Add users"

    24
  25. Type the email that you copied from Google APIs, then click "Add".

    25
    account permission
  26. Click "View Settings"

    26
  27. Copy VIEW ID

    27
  28. Enter the ANALYTICS_VIEW_ID value in the .env file

    ANALYTICS_VIEW_ID=238189280

    Or enter it in the Analytics View ID in the Settings menu

    analytics view id