question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

anaylitcs doesn't show page view name using trackView

See original GitHub issue

Hi there!

I’m using Ionic 3 and I want to track each page of my application.

In my app.components.ts once platform is ready, I am initializing the plugin as follows:

private startAnalytics() {
    // start analytics
    this.analytics.startTrackerWithId('XX-XXXXXXXXX-X') // I put my real ID here 
                  .then(() => 
                  {
                      console.log('Google analytics now enabled');
                  },
                  () => 
                  {
                      console.log('Google analytics failed to start');
                  });
}

Then, in each page, I inject the GoogleAnalytics object and in the ionViewDidLoad method I call trackView method.

In google analytics dashboard I can see I have page views but when I go to pages report it says page title is (not set).

image

I’m afraid I am misusing this somehow or there is something I am missing here.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

8reactions
timmyrosencommented, Aug 24, 2017

I have the same problem, I can track events but not pages/views. I can even follow it in the Real Time dashboard and see that I have 1 active user but no active page. I have also tried waiting a couple of days for the data to appear in the standard view, but still no pages.

I have enabled debugmode and the output looks successful to me. Even the promise from the trackView method returns successfully, but no view appears in Google Analytics. I even tried downgrading to v1.7.11 but the issue remains.

I have tried sending data with the trackView method and I’ve tried just sending the name of the view but none of the methods work.

Is this a problem with the plugin, the Ionic wrapper or with Google Analytics?

Ionic info:

cli packages: (/Users/timmyrosen/Sites/kalmar-omsorg/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.6.0

System:

    ios-deploy : 1.9.1 
    Node       : v8.4.0
    npm        : 5.3.0 
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b 
3reactions
victorsosacommented, Aug 25, 2017

Please everybody check the issue #420, this is related to the new change of Google to firebase platform.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google analytics doesn't show tracking for some pages
I developed app in which i have integrated google analytics. My app has TabBar, : The 4 tabbar you can see in image,...
Read more >
[Done]-Google Analytics don't show page view title
I'm using google-analytics-plugin to connect google analytics with ionic 1. In app.js, /* Google Analytics */ if(typeof analytics !== undefined) { analytics ......
Read more >
Track Single Page Apps with Google Analytics 4 and ...
Learn how to track Single Page App with Google Tag Manager (or Single Page Website), and send that pageview data to Google Analytics....
Read more >
FAQs
How to view, manage, or cancel my TrackView subscription? ... What should I enter for device name on the TrackView login page? You...
Read more >
Measure screenviews | Google Analytics for Firebase
Automatically track screens. Analytics automatically tracks some information about screens in your application, such as the class name of the UIViewController ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found