41

According to the Google Analytics "Creating a Report" guide, a required field for a request is the viewId:

A valid view ID for the viewId field.

Cool. So what is a viewId and where do I find it? I click on the viewId link and it says:

Unique View Id for retrieving Analytics data.

Umm. Ok. But what is it, and how do I find it for the report I want? It doesn't appear to be the same as "property ID". Come on Google, we need a little more to work with here.

1
  • 3
    View is no longer a thing in GA4 Commented Jul 9, 2022 at 13:40

4 Answers 4

43

Following below steps to get View ID.

  1. Sign in to Google Analytics.
  2. Click Admin, and navigate to View.

  1. In the VIEW column, click View Settings.

  1. View ID places in Basic Settings

5
  • 2
    I never get to step 3, I have create by mistake already 3 properties. After 2 weeks still can't find this elusive view id. Commented Jul 3, 2020 at 14:25
  • You probably didnt click ADMIN in the lower left. Its easy enough to find from there. Presuming you have a view set up. That's a prerequisite. Which you complete in a similar manner. Commented Mar 23, 2021 at 14:04
  • 1
    I am not getting the third tab view. I am only getting the create Account and create property options. What should i do.
    – David
    Commented Dec 14, 2022 at 7:11
  • @Long Nguyen, Is that you viewId in the url following the p param?
    – teddybear
    Commented May 28, 2023 at 12:52
  • Same experience as @David Commented Jul 8, 2023 at 19:21
32

A property is where the data is collected (so hits to a property count toward your hit quota for that account). A view is where you look at the data, it displayed hits from the property. Hits displayed in view do not count towards your quota.

Use cases are that you can include/exclude/change the data in views by filters, and set different permissions for views (e.g. different departments should have access only to tracking for certain sub-directories, stuff like that). You can create up to 25 views with different settings per property.

You find the view id when you go to the admin section and look at the outer right column (which is labelled "views"). Select the view you want to query from the dropdown and go to "view settings", there you find the id. Or visit the query explorer while you are logged in to Google and select the view from the dropdown, this will also show the view id (and you can start testing queries right away).

3
  • 3
    Nice! This is exactly what I needed. I would have never known that View ID was buried deep in the Analytics admin area.
    – John D.
    Commented Apr 27, 2016 at 19:11
  • 1
    Same here - took me for ever to just figure out whether the view ID was generic/fixed for a type of reporting or customized to my site. Now I know! Commented May 4, 2017 at 21:19
  • 1
    I actually spent 1 hour trying to figure out what is going on with the View ID. I kept thinking it is the same ID as the 'Service Account' email ID that was created. Thank you!
    – SajidSalim
    Commented Jan 2, 2018 at 14:09
8

This document describes the Google Analytics account structure, and should answer your question as to what a view is: https://support.google.com/analytics/answer/1009618

If you're even unsure of what ID to use with a particular GA API, you can use the account explorer to find out:

3
  • 1
    Still even with these two links, I can't seem to find what my "viewId" value should be...
    – John D.
    Commented Apr 27, 2016 at 19:08
  • 2
    The second link will show you your view ID as well as all your other account related IDs. Just type in the search field to find your account, and then look in the table below under the "View" column. Commented Apr 27, 2016 at 20:04
  • 2
    Account explorer does not work for GA4 although the nightmare that is Google documentation will still point you there even in Q3 of 22 Commented Jul 9, 2022 at 13:39
8

Only Universal Analytics property have VIEWID, GA4 has not.

0

Your Answer

By clicking “Post Your Answer”, you agree to our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.