I have 2 types of products : productA and productB.
Whenever products are getting sold I am sending events (product name with price) to GA as:
event-category - productA/productB
event-action - product sold
event-label - 20
I need to create a chart where I can see sum of cost of productA and productB separately.
Something like this :
EventCategory Event Label
productA 100
productB 400
You can't sum those values in Analytics because the label is a dimension, so it's interpreted as a string.
For what you need you must use the event value or a custom metric associated with the event. In this way the values become summable.
In your case you can only export the data, i.e. to an Excel, and perform calculations outside of Analytics.
Related
We track search terms (e.g. michael kors handbags) entered on our site as an event (i.e. captured in eventLabel). We have a custom dimension that parse the list of product ids returned on a search page.
Example:
'michael kors handbag' returned 5 products on search page. Custom Dimension 1 parses a list of product ids: '12345, 23456, 34567, 45678, 56789'. On an event report, when I use this custom dimension 1 as a secondary dimension, no data is returned. I am seeing the two tags fired (i.e. one as an event hit and the other as a pageview hit) - I am not able to figure out why the custom dimension 1 cannot be used as a secondary dimension.
Any insight is helpful.
Thank you.
The dimension needs to be scoped at Session level, so it's available for all the hits within a session.
Probably the dimension is set at hit level, so the information doesn't persist, when you try to relate it to the event, GA cannot do it.
I have multiple analytics accounts, I am facing problem with one of them. I am trying to fetch data through Analytics Core Reporting API v3. The metric combination selected are ga:avgPageLoadTime, ga:users and for other API call I removed the metric ga:users.
For some date ranges I can fetch data when ga:users is added to metric combination, but same API call without ga:users is not fetching any of the data.
metric combination #1:
ga:avgPageLoadTime, ga:users
metric combination #2:
ga:avgPageLoadTime
For some date ranges:
The data gets populated for metric combination #1, but gets no data for metric combination #2. Also with metric combination #2. I am also getting data when filtering is added.
Dimension selected is: ga:deviceCategory
I've created a custom report with dimensions:
Event Category, Event Label, Page Title
And want to see this metrics:
Total Events
Pageviews
Avg. Time on Page
Also, I applied a filter by event category.
I see my report with some values in Total Events column, but Pageviews and Avg. Time on Page are always zero. What is the problem?
Your problem is occuring due to the custom report you have generated.
Events by definition are not page views. This means that an Event dimension (category, action, label) cant have page view metrics such as pageviews or average time on page, because that information does not relate to the specific event.
One way to product the report you might want is to create a segment for sessions which contain the event you are interested in, then create a Custom Report with the dimension pages, total event, pageviews, and time on page.
Update:
Understanding what you are trying to achieve, you will need to do two reports, and merge them on pagePath (assuming there is only one video per page).
Report 1:
Event Category, Event Label, Page Path, Total Events.
Event Category Event Label Page Path Total Events
Video Id1 /video1 2
Video Id2 /video2 3
Report 2: Page Path, Page Views, Time on Page
Report two requires a segment: Sessions that contain Event Category == VideoView (assumed category).
Page Path, Page View, Average Time on Page.
Page Path Page views Average Time on page
/video1 5 0:42
/video1 10 0:16
The final merged dataset would look like
Event Category Event Label Page Path Total Events Page views Average Time on page
Video Id1 /video1 2 5 0:42
Video Id2 /video2 3 10 0:16
I had the same problem and as sdhaus says you'd need to merge two reports. I didn't want to include even more vendors but I found nowadays Looker Studio does exactly that: you can just merge the Analytics data source with another instance of itself and voila: match on page title or path and you're done!
Does UniqueEvent also consider the EventValue field?
Let's make an example.
In the same user session, these two analytics are sent:
1)
EventCategory = "UI"
EventAction = "Click"
EventLabel = "Result"
EventValue = 5
2)
EventCategory = "UI"
EventAction = "Click"
EventLabel = "Result"
EventValue = 3
do they count for 1 or 2 UniqueEvent?
I have been assuming so far that EventValue is irrelevant for the UniqueEvent, and it could even be used for sending the current timestamp.
The Unique Event definition is:
Unique Events: The number of times during a date range that a session
contained the specific dimension or combination of dimensions.
One important thing to notice is that Unique Events has nothing to do with Events. If this sounds confusing is because it is, but stay with me.
Unique Events is a special metric in Google Analytics it is context dependent. The number of unique events will depend on the dimension, or combination of dimensions you use.
Want proof that unique events has nothing to do with events? Go to an account with a bunch of pageviews and 0 events, and try to create a report of any dimension by page, the number you see should be close to unique pageviews (but not quite).
Event Value is a metric not a dimension, so it can never influence unique events.
Now to your question on whether your example counts as 1 or 2 unique events, the answer is not defined unless you define the actual report you are trying to do.
I have the website where merchants sell some stuff. Each item has stats like unique views during last 24 hours, a week and a month and a number of visitors that clicked on "show contacts" button. Uniqueness based on IP. This works, there're huge tables that collects all (IP,item_id) pairs during the last month, and there're a lot of updates.
Today I dig into google analytics api, I would like to know if it's possible to use it instead of my system.
The fact is all this stat is private, available only for merchant, so I don't need to have all stat at a time (it's not compared etc.). So it might be requested on demand for the specific item.
I created service account, connected it to analytics data and it seems export works (based on this example). Then enabled event tracking for "show contacts" button.
For example, when user click on "show contacts" where should I add item_id? Is it eventLabel or eventValue? So, for item_id=1234 it should be
ga("send","event","Contacts","show","",1234) or ga("send","event","Contacts","show",1234)?
I'm confused with eventValue column in Top Events report (it seems that eventValue keeps a sum of all eventValues and even caculates Avg.Value). Does it mean item_id should be stored in eventLabel as string?
I added second, nonInteraction event for collecting item views, ga("send","event","Data","show","1234",1,{nonInteraction:true}). It count all events, but I need only unique ones (performed by unique visitors) in specified period of time (day, week, month). Is it possible?
1) The parameters are category, action, label and value. "Value" is a metric and is expected to be an integer. Since it's a metric it will be added up. So if you do
ga("send","event","Contacts","show","",1234)
you will increment a metric by 1234, not store an id. You do not want this (especially if you have a linked adwords account, since this will be used to calculate your "return on advertising spent").
You want to use your item_id as label, however label is a string. So what you need to do is:
ga("send","event","Contacts","show","1234")
i.e. wrap the value for your label in quotes.
2) Is there anything wrong with ga:uniqueEvents for your purposes ?