3

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?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Jeff G
  • 908
  • 8
  • 18

1 Answers1

0

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.

Дмитро Булах
  • 3,697
  • 1
  • 14
  • 23
  • 1
    So you're suggesting that if I had set `page_location` but not `page_path`, then it would use this to derive the missing `page_path`? – Jeff G Jan 28 '20 at 01:19