Hi,
I am trying to implement the new version of F7 with Router and Views, but I have a problem with the implementation of Google Analytics. Currently our app uses version 1 of F7 and when working with individual pages, there was never a problem with Analytics. We use the Cordova plugin cordova-plugin-google-analytics.
Now in version 5 of F7 we have the problem that when using Views / Router only hits the main page and not the following views. Has anyone had this problem? How could I solve it?
My Analytics Code
<script>
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.ga.startTrackerWithId('UA-XXXXXX');
window.ga.trackView('PAGE NAME');
}
</script>
My First Page (Analytics works)
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="app">
<div class="view view-main view-init">
<div class="page page-first">
**<script>ANALYTICS</script>**
</div>
<div class="toolbar toolbar-top tabbar tabbar-scrollable">
</div>
<div class="page-content">
</div>
</div>
</div>
</body>
</html>
My Second Page (Analytics not works)
<div class="page page-second">
**<script>ANALYTICS</script>**
<div class="navbar">
</div>
<div class="toolbar toolbar-top tabbar tabbar-scrollable">
</div>
<div class="page-content">
<div class="tabs">
</div>
</div>