Google Analytics not tracking views in Android Ionic 3 Application with gtag.js
问题 I'm using gtag.js to track analytics on my Ionic application. This works with iOS, but not with Android. In index.html, I've add the script : <script> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'UA-XXXXXXXX-XX', { 'send_page_view': false, 'app_name': 'MyApp' }); </script> I've made a provider for analytics : import { HttpClient } from "@angular/common/http"; import { Injectable } from "@angular/core"; import