What is a viewId in Google Analytics? - google-analytics

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.

Following below steps to get View ID.
Sign in to Google Analytics.
Click Admin, and navigate to View.
In the VIEW column, click View Settings.
View ID places in Basic Settings

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).

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/

Only Universal Analytics property have VIEWID, GA4 has not.

Related

Deleting a filter from a view in Google Analytics

I've inherited some websites. In Google Analytics, some have filters attached to them as a view - which is filtering out all traffic. How do I delete these?! In Admin > View > Filters, there is no delete button. When I try to change the filter, there's no save button, but if I navigate away from the page, an alert pops up saying "Your changes have not been saved". How on earth do I alter the view? Thanks
Google analytics has two permissions levels which are;
1. Edit Permissions at account level
2. Edit permission at view level
From your statement, it is clear you have been given the 'edit permissions at account' level since you dont have the options to delete at views level. This is due to the fact that you inherited the account and the main admin hasn't given you that authorizations yet.
Kindly find more information from this link below;
https://support.google.com/analytics/answer/1034823#Permissions

Google Analytics: only give permission to view specific events

I would like to allow contextual advertisers to view the statistics of some specific events.
Is it possible in Google Analytics to give permissions to a user to only view specific events?
Well you could create a view where you filter out everything except those events and give them permissions only for that view. That sound impractical, though.
I would rather suggest you create a custom report for that event and have it mailed once a week or so to your publishers (you will find the mail facility in the top menu where it says, well, 'email').

How to show count of any jstree in google analytics

I am using google tag manager to fire tags for my website, I created custom javascript variable which returns count of my jstree selection (i.e how many users selected how many items) and i placed a trigger on this count, just wanna know if there is any way that i can see this count on my google analytics page so as to analyse how many users are selecting how many items?
Found answer myself, Hope it will help others too.
To show count of any custom variable that you created on your google tag manager on your Google Analytics page is possible by creating custom dimensions on Google Analytics. Steps for doing this are below :-
Go to your google Analytics account, open admin section.
-Then go under property-->custom definations and select custom dimensions
click on new custom dimension add name and select scope "session" and click on create (Note :- please note your dimension index).
Go to google tag manager, Create a new tag, click on more settings under "configure tag" and add custom dimension, place index number and dimension value(custom variable that you created) here.
set your firing rule and save it.
Now, you can see it under report by setting secondary dimensions as custom dimensions. Also if you want to further analysis on this data you can also use Biq Query plugin for GA.
You are ready to go!!

Multiple links pointing to the same location. Track which one was clicked using Google Analytics

I'm trying to get Google Analytics to track the specific link in the page that was used by the users to get to a specific location.
Say I have links poing to the contact page from the main menu, the page's contents and the footer.
Looking at what other websites are doing, I've added references inside GET parameters for each of the links like so: http://www.example.com/contact?ref=menu , http://www.example.com/contact?ref=content and http://www.example.com/contact?ref=footer . I've also added the ref parameter to the ignore list inside Google Analytics so the three URLs are not tracked as separate pages.
My question now is: How sould I go about tracking which one was used to get to the contact page?
Although the post is a bit old, for others like me finding this via search, here is the solution. Enhanced Link Attribution in Google Analytics.
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867
Sounds like you are already tracking them with the URL param.
If Google Analytics is successfully tracking them as separate pageviews with the ref= URL param, then you could create a custom report in GA that shows the number of pageviews. The custom report can be added to your dashboard for quick reference.
The custom report can be set up like this:
Metric groups: pageviews
Dimension drilldowns: page
Filters: include -> Page -> regex -> /contact\?ref=(content|menu|footer)
Or, for each click, add the following to each link:
Contact
Contact
Repeat for each link. This is no more work than adding a ref= to each link.

Google analytics to track impressions/views?

I have a site that lists business listings from a database. On each page you can do different things such as forward it to a friend, print the page etc. My question is could I use google analytics to track impressions and views for each listing? So if I showed the top 10 listings on the home page I want to track each listing as an impression since its being showed, then if they click one of the links to view the business listing it tracks it as a view. Then on the business listing details page if they do any of the actions such as forward to a friend or print the page I want to track that as well.
For tracking views/clicks Im assuming I would need to use setPageView passing something like setPageView('/listing/12345') correct? I dont know how to track it for impressions though. Then on the listing details page to track if they printed it etc Im assuming I would track it as an event? Such as trackEvent('listing', 'Print') if that is what I need to do for event how does it associate with the page tracking so that I could see how many times someone printed the listing page for /listings/12345?
No need to create fake page views. Google Analytics has a feature called Event Tracking, which is described in the Event Tracking Guide. The guide has an illustrative example;
A simple example illustrates how you might use the Event Tracking method
to record user interaction with a video Play link on your page. It
assumes that pageTracker is the name used for your tracking object.
Play
In this scenario, the reports for Events would display Videos as the Category,
Play as the Action, and Baby's First Birthday as the Label.
In your case, you would track Views and Clicks using the Event Tracking feature. You'd have to decide on how you'd want Actions, Categories and Labels set up to match your data. You might want package types (Gold, Silver etc) as Categories or Labels, for example.
This question and its answers are similar to your scenario.

Resources