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.

Not seeing analytics on Google Analytics

See original GitHub issue

I am debugging an issue on an iOS Cordova app. This plugin (verison 1.8.2) is being used. There is no traffic reported on the Google Analytics dashboard.

This is the code:

window.analytics.startTrackerWithId('UA-XXXX');
window.analytics.trackView('Main');

So apparently, this is the old coding syntax? I tried to change to the new way:

window.ga.startTrackerWithId('UA-XXXX',30);
window.ga.trackView('Debugging Screen Title');

I need to see this working before submitting this fix. I keep looking at the Real Time dashboard on the Google Analytics dashboard. However, I am not seeing my testing screen title “Debugging Screen Title”.

So it appears that the plugin is still not sending in analytics to Google? How should I debug this?

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
mhinman87commented, Aug 8, 2017

I cannot figure this out. I am using Ionic, I am using the latest everything,

   @ionic/cli-plugin-cordova       : 1.6.2
   @ionic/cli-plugin-ionic-angular : 1.4.1
   @ionic/cli-utils                : 1.7.0
   ionic (Ionic CLI)               : 3.7.0

and I am using the latest version of the plugin

<plugin name="cordova-plugin-google-analytics" spec="^1.8.3" />

I am following directions exactly as it says on

https://ionicframework.com/docs/native/google-analytics/

and I still cannot get this to work properly. I suspect it has something to do with mobile vs web but I am not sure what to change.

If I run the app, look at real time data on the google analytics site, I can see myself as an active user, I can track events, but no data ever remains after it falls off of the real time tracking dashboard. I also cannot use trackView() at all. I am running my app on iOS using the ionic CLI.

Any thoughts or help would be greatly appreciated.

2reactions
timmyrosencommented, Aug 17, 2017

I have the same problem, I can track events but not pages/views. 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.

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

Ionic info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.9.1
    ionic (Ionic CLI) : 3.9.1

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:

    Android SDK Tools : 25.2.5
    ios-deploy        : 1.9.1 
    ios-sim           : 5.0.8 
    Node              : v8.1.2
    npm               : 5.3.0 
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Your Google Analytics Isn't Working (and How to Fix It)
Open your Real-Time report, wait a couple of seconds and you should see the number of all current active users on your site...
Read more >
[GA4] Troubleshoot tag setup on your website - Analytics ...
If you just installed Google Analytics for the first time, and you don't see any data coming in, it may be that you...
Read more >
Troubleshoot tag setup and no-data issues - Analytics Help
This troubleshooter is designed to help you resolve issues with the setup of your Analytics tag. Select the issue that most closely matches...
Read more >
Why is Google Analytics Not Showing All My Traffic?
Common Google Analytics Issues (and How to Fix Them) · 1. Your tracking code is not set up correctly · 2. You are...
Read more >
Google Analytics 4 not working? Here is how to fix it.
#1 Delete and disable the cache. You may be in a situation where you are making many code changes to your website, but...
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