How to track pageviews after the initial landing page view using Google Data Studio

When you are looking at Google Analytics data for ads, the real, important numbers are often slightly hidden. For example, if you want to see what pages users are visiting on your site after you just spent $5 per click to get them there, you will need to exclude the landing page views.

Why exclude the landing page views?

If your user clicks on the ad completely on accident, the browser starts to load, and then the user hits the back button and is off your site, that will still fire a page view!

If you are expecting your users to be moving on to other pages on your site after hitting the landing page (this is especially the case if you are landing them on the homepage), it is very instructive to look at the page views that were not landing-page views (entrances) so you can see what your users are doing.

Are they moving on to any other pages at all? If so, which ones? How many people from your campaign that is landing on move on to

What you should know

A “landing page” is the term used when you’re looking at a full session. It is the page the session started on. So “landing page” will give you a URL, not a number of visits.

When you’re looking at an individual page, and you want to see how many sessions started on that page, the metric you need is called entrances.

How to see the non-entrance pageviews for each page in Google Data Studio

  1. You will first need to have access to a Google Analytics account for the site you want to analyze
  2. Open the Google Data Studio report you want to edit, or if you don’t have one, create a new report and connect the Google Analytics View you want to look at.
  3. Click “Resource”
  4. Click “Manage Added Data Sources”
Manage Added Data Sources Google Data Studio
  1. Click “Edit” for your data source
  1. Click “Add a Field”
Add a field Google Data Studio
  1. Name your field “Pageviews minus landing views” (or whatever your prefer).
  2. For the Formula, use Pageviews – Entrances.
  3. Click Save.
  4. Click Done.
setting up pageviews minus entrances google data studio

That’s it! Now you can use your new Metric in any chart in that report.


How to extract the plain URL from a URL with query parameters using Google Data Studio

When you have a website, you often have product category pages or search results pages that include parameters. Something like this:

In this example your user searched for the term “lawn widget” and set the maximum price to 500 $/€/etc.

When you have searches for 2,000 different products, it makes it impossible to use your standard Google Analytics data to cleanly compare use of the page overall — eg, the /product-search page.

Here’s how to get just the clean URL in Google Data Studio.

This is handy because it works for all historical data in Google Analytics, whereas if you set up a filter in a new view, that will only apply to pageviews from there on out.

What you’ll need

  1. Google Analytics set up on your website
  2. Access to the Google Analytics account
  3. Create a Google Data Studio report

Steps to extract the page URL without the query parameters

  1. Open your Google Data Studio report if you have one, or create a new one and add the correct Google Analytics account as your source data
  2. In the menu, click “Resource,” then click “Manage Added Data Sources”
  3. For the GA data source you want, click “Edit”
  1. Click “Add a Field”
  1. Name the field “Page URL with parameters removed” (or whatever you prefer)
  2. Copy and paste this formula into the Formula field.
REGEXP_EXTRACT(Page, "^([\w-/\.]+)\??")
  • If you get an error message, manually delete and re-type the quotation marks in the formula.
  • If you still get an error message, re-type with a double backslash in each spot where there is a backslash:
REGEXP_EXTRACT(Page, "^([\\w-/\\.]+)\\??")
  1. Click Save.

  1. Click Done.

You can now create a chart using the new field as a Dimension.

Bonus: To remove the underlining in a chart

  1. Select the chart
  2. Click the link icon next to the dimension name

  1. Change the Type from URL to Text