Common Calculations – Google Analytics – Google Code

I’ve been researching common, useful and even strange web metrics off and on for about a year now.  This list is just meant to be a primer for some common calculation types you can do with Google Analytics.

Have you used any of these?

Common Calculations – Google Analytics – Google Code.

Calculation Type Objective Method(s) Notes
Bounce Rate
Bounce rate by browser or dimension other than page
1
ga:bounces/ga:entrances
Use to calculate the total number of bounces for your entire site, or by a dimension other than 

1
ga:pagePath

. This calculation divides the number of bounces (single request interactions of all types) by the number of sessions that included a pageview. When this is segmented by a dimension such as browser, you will receive the number of bounces by browser and entrances by browser.

Conversion Costs
For all transactions and goals
1
ga:adCost/(ga:goalCompletionsAll + ga:transactions)
If you calculate revenue based on all goal completions, then this value should be part of your formula.
For goals only
1
ga:adCost/ga:goalCompletionsAll
If you are interested in calculating conversion costs based only on the values you specify for your goals, use this formula.
For transactions only
1
ga:adCost/ga:transactions
If your goal values do not add anything meaningful to your revenue, or if they are redundant values that are entirely captured in your revenue totals, use this formula.
Exit Rate

You can use the following two formulas to calculate an exit rate. When examining exit rate for a page, it can be useful to use both formulas to determine the overall popularity of a page with respect to the page being the last in the session.

Note: While it might seem logical to use 

1
ga:exits/ga:visits

to calculate exit rate, this calculation will almost always result in the value 

1
1

, because every visit will have exactly one exit.

How many sessions ended on a particular page?
1
ga:exits/ga:uniquePageviews, ga:pagePath
When segmented by 

1
ga:pagePath

, returns the percentage of visits which included the page and also ended on the page. This calculation focuses on the number of sessions that included the page at least once and ended the session.

How many views of a particular page ended the visit?
1
ga:exits/ga:pageviews, ga:pagePath
When segmented by 

1
ga:pagepath

, returns the percentage views of the page (out of all the views) where the view ended the session. This calculation focuses on total pageviews for a particular page, so you can use this to determine frequent views of a page where that page was also the last in the session.

Goal Conversions
Total abandonments for a particular goal
1
ga:goal1Starts - ga:goal1Completions
Abandonment rate for a particulal goal
1
(ga:goal1Starts - ga:goal1Completions)/ga:goal1Starts
Conversion rate for a particular goal
1
<span id=":3fq" dir="ltr">ga:goal1Completions/ga:visits</span>
Funnel completion rate for a particular goal
1
ga:goal1Completions/ga:goal1Starts
Shown in the Abandoned Funnels report.
Revenue
Average revenue per transaction
1
ga:transactionRevenue/ga:transactions
Average revenue per visit
1
ga:transactionRevenue/ga:visits
Average goal value per visit
1
ga:goalValueAll/ga:visits
Average revenue per advertisement click
1
(ga:transactionRevenue + ga:goalValueAll)/ ga:adClicks
See the examples under conversion costs for other permutations you might use.
Average event value
1
ga:eventValue/ga:totalEvents
Visitor Calculations
Average time on page
1
ga:timeOnPage/(ga:pageviews - ga:exits)
This calculation removes the number of exits from the formula, so that the average does not account for those pages where an exit occurred. However, many web analysts prefer to include exits in the formula.
Average session length
1
ga:timeOnSite/ga:visits
Percentage of new visits based on unique visits
1
ga:newVisits/ga:visitors
Percentage of new visits based on all visits
1
ga:newVisits/ga:visits
Given a page

1
test.html

, which pages are users coming from?

1
2
dimensions=ga:previousPagePath
metrics=ga:pageviews filters=ga:nextPagePath%3D~test.html
When you have a specific page in mind for which you want to find navigation, two queries are required.
Which pages are users going to after

1
test.html

?

1
2
dimensions=ga:nextPagePath
metrics=ga:pageviews filters=ga:previousPagePath%3D~test.html
%d bloggers like this: