I have built an Angular SPA and I am ready to implement tracking. I want to keep it simple so no plug-in just direct gtag tracking. So, I've gone through all this documentation for the most part it makes sense. The only thing I am confused about is screen_view vs page_view and how does page_path fit in. Have a look at the following snippet:
When building web apps, use screen_view events to measure specific screen views in Google Analytics. This provides similar functionality to Firebase screen_view events on native Android or iOS apps, or pageview events on standard web pages.
Since i built a web app and it is not standard web pages this to me means I should be using screen_view over page_view. If you take that at face value it's fine but it's followed up with another piece of documentation saying:
When your application loads content dynamically and updates the URL in the address bar, the page URL stored with gtag.js should be updated as well.
Alright if I've taken what I have learned above, on navigation to a new page, I should be doing this:
gtag('config', GA_MEASUREMENT_ID, {'page_path': page_path});
gtag('event', 'screen_view', {
'app_name': app_name,
'screen_name' : screen_name
});
Is this correct? Should I be running both of these? Also, is screen_view over page_view the correct event to use with SPAs?
one note: if this is correct my plan is to turn off page_view all together and just go with screen_view