What is a viewId in Google Analytics?
Asked Answered
A

4

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.

Astylar answered 27/4, 2016 at 18:32 Comment(1)
View is no longer a thing in GA4Lubricious
U
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).

Upstairs answered 27/4, 2016 at 18:52 Comment(3)
Nice! This is exactly what I needed. I would have never known that View ID was buried deep in the Analytics admin area.Astylar
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!Sheen
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!Gunnery
V
43

Following below steps to get View ID.

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

enter image description here

  1. In the VIEW column, click View Settings.

enter image description here

  1. View ID places in Basic Settings

enter image description here

Verdellverderer answered 21/12, 2017 at 9:25 Comment(5)
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.Antoniaantonie
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.Involuted
I am not getting the third tab view. I am only getting the create Account and create property options. What should i do.Herringbone
@Long Nguyen, Is that you viewId in the url following the p param?Platform
Same experience as @HerringboneBushel
U
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).

Upstairs answered 27/4, 2016 at 18:52 Comment(3)
Nice! This is exactly what I needed. I would have never known that View ID was buried deep in the Analytics admin area.Astylar
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!Sheen
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!Gunnery
R
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: https://ga-dev-tools.appspot.com/account-explorer/

Ryannryazan answered 27/4, 2016 at 18:52 Comment(3)
Still even with these two links, I can't seem to find what my "viewId" value should be...Astylar
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.Ryannryazan
Account explorer does not work for GA4 although the nightmare that is Google documentation will still point you there even in Q3 of 22Lubricious
U
7

Only Universal Analytics property have VIEWID, GA4 has not. enter image description here

Unhook answered 14/4, 2021 at 1:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.