Analytics
6.4K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

How to create a Google Analytics report of one metric as a function of another?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I want to set up a Google Analytics timeline report of one metric as a function of another. Example scenario:

 

  1. The user does something on page #1. On that page there is dynamically generated content, e.g. an image banner with different text.
  2. The user interacts with that content which generates event hits with different labels (ABC... dynamically generated based on the dynamic content on the page).
  3. The event hits with their labels are sent via POST to Google Analytics using the measurement protocol.
  4. The user does (or does not) visit page #2

 

I want to be able to measure the efficiency of each event label defined as:

Efficiency = (Number of users visited page #2) / (event label)

 

Ideally this should be able to give me an idea which are the most efficient event labels for:

  • particular hour of the day
  • particular day of the week
  • particular months of the year

Looking at the goal funnels it seems possible to define only funnels based on a sequence of page views, not as a function of event labels (not talking about dynamic ones at all). It also seems not possible to set it up as a content experiment because the labels are dynamic and everything should be measured long term, new labels can be added, older ones can be removed/restored etc.

 

Is that possible to do what I am looking for with Google Analytics?

2 Expert replyverified_user

How to create a Google Analytics report of one metric as a function of another?

Top Contributor
# 2
Top Contributor

The best way to achieve what you describe is by using segments with sequence settings, e.g. viewed page 1 then trigered event label soandso and then viewed page 2

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

How to create a Google Analytics report of one metric as a function of another?

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

That's an interesting idea but how will you create a sequence segment considering that the event labels are not a fixed set know beforehand but can change in time? Imagine there are 100 events. To be able to show how each label compares to another that would need 100 segments, all created by hand. And for every change in the labels another set of segments will have to be created and added to the view etc.

 

Can you suggest something for dynamic event labels?

 

EDIT: As noted I am also looking for a way to calculate event label efficiency as percentage.

How to create a Google Analytics report of one metric as a function of another?

Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆

Hi @joegatt,

What if you use virtual pageviews instead of events. 
You could use url like (example) /vp/eventcategory/eventAction/eventLabel(dynamic). to send the pageview hit through MP.
You can then set up goal funnels too. 

Also to calculate efficiency, you can then create a segment of users who visited page #2 and then look at all the dynamic event labels triggered in all pages report. (assuming client ID is same in the MP hit) 

Let me know, if you were looking for something else.

Thanks,
Ritwik

How to create a Google Analytics report of one metric as a function of another?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

@Ritwik B

Thanks for the suggestion.

 

I have already thought about that workaround and of course if it is based on a goal with a page funnel then the percentage is easy to report. However I really don't want to "cloak" the GA reports with fake page views, because some of the projects I am working on are actually single-page websites and already have virtual page views for other content interactions. So it will become pretty difficult to manage if I add more structure which needs to be taken into account all the time. Imagine a site with 1 page generating hundreds of page views for all kinds of clicks, hovers etc.

 

That's why I am wondering how to make it with events instead which would be the correct way as the interactions actually are events.

How to create a Google Analytics report of one metric as a function of another?

[ Edited ]
Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆

Hi @joegatt,

Yes. That fake pageviews will be a problem. Did you try using Google analytics API?. Its more flexible. You can try exporting the data to spreadsheets with specific metrics (events, unique pageviews,etc) and then calculate Efficiency (and then maybe for visualization you can use data studio)

Thanks,
Ritwik

How to create a Google Analytics report of one metric as a function of another?

Rising Star
# 7
Rising Star

+1 to using the API for this - google sheets and google analytics add-on for the win!

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.

How to create a Google Analytics report of one metric as a function of another?

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Can you elaborate a little on the API please? I see several APIs here:

 

https://developers.google.com/analytics/

 

Re. exporting - I am looking for a way to display reports directly and automatically. Calculating data externally (offline) is not an option.

 

I still know nothing about data studio. Do I need it?

 

Thank you.

How to create a Google Analytics report of one metric as a function of another?

Top Contributor
# 9
Top Contributor

You want the Reporting API.

DataStudio becomes somewhat useless for this particular report you're looking for, although you could export results of your API queries to Google Sheets and link that data to DS.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

How to create a Google Analytics report of one metric as a function of another?

Rising Star
# 10
Rising Star

If you want to calculate your own metrics, then the best way to approach this is via the reporting API (as Julien says). You can make life easy for yourself and use the Google Analytics Add-On in Google Sheets.  The API + Google Sheets combination can refresh automatically and you can give your colleagues view only access to the numbers and graphs.

John Wedderburn, Advertiser Community, Rising Star
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.