Search code examples
google-analyticsmeasurement-protocol

Where does gtag pageview's 'page_location' get reported?


I'm using the Google Analytics's gtag.js on a single-page webapp (SPA). As suggested in the docs for SPAs, I've disabled the automatic send_page_view and instead explicitly send a page view by setting a page_path and page_title to the gtag config. So far, so good.

The docs also list an optional page_location parameter to send the page's full URL. For my app's search page, I'm particularly interested in getting the full query params after the ? in the URL, so I tried adding it to that payload:

   gtag('config', GA_TRACKING_ID, {
     page_location: window.location.href,
     page_title: 'app search page',
     page_path: '/search',
   });

However I never see a full URL in either the Anlaytics web UI or in its export to BigQuery. I only the page_title and page_path. Where does page_location end up getting stored or reported?


Solution

  • page_location is not reported in Analytics but might be used for processing source and medium parameters and for extracting page_path if not provided.