I'm using the official Firebase JS SDK in a Vue-based SPA. To get more useful analytics through Firebase's firebase.analytics() Google Analytics integration, I would like to disable automatic reporting of page_view events.
I'm aware that, under the hood, Firebase Analytics uses Google's gtag.js for reporting to Google Analytics and I know that I can configure gtag to not send that event automatically like so:
gtag('config', 'MEASUREMENT_ID', {
'send_page_view': false
});
My problem is that I can't seem to find a way to set that kind of configuration value through firebase.analytics(). I've tried analytics.setUserProperties({ send_page_view: false }), but that doesn't seem to work as the page_view event is still reported to Google.
Is there any way to set this configuration value in Firebase analytics or is there another way to disable automatic page-view reporting here?