Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trackView not tracking #552

Open
damianclem opened this issue Jan 24, 2019 · 3 comments
Open

trackView not tracking #552

damianclem opened this issue Jan 24, 2019 · 3 comments

Comments

@damianclem
Copy link

Hello,

I've been able to successfully install the latest version of the AG plugin on my Cordova / Ionic / Angular application. I'm able to Track Events using the TrackEvent() method.

However, I'm having trouble getting TrackView() to work in a most simplest form.
I've tried the following. And I'm not seeing any errors getting thrown.

import { GoogleAnalytics } from '@ionic-native/google-analytics';
private ga: GoogleAnalytics;

ga.startTrackerWithId('UA-XXXXXXX-X', 30).then(() => {}).catch(e => alert('Error starting GoogleAnalytics == '+ e));

ga.trackView('Hop Create Page').catch(e => alert('Error Track View == '+ e));
ga.trackView('Hop Create Page', '', true).catch(e => alert('Error Track View == '+ e));
ga.trackEvent("Hop", "Created Hop", "Hop", 1).then(()=> {}).catch(e => alert('Error Track Event == '+ e));;

Thanks for any help you can provide!

Damian

@Shadayy
Copy link

Shadayy commented Feb 21, 2019

This is not working for me either.
Is there any other configuration that needs to be done?

@joao-jr
Copy link

joao-jr commented Apr 4, 2019

Same issue.

@Shadayy
Copy link

Shadayy commented Apr 4, 2019

I figured out why it didn't work for me.
My Android Ionic project is connected to Firebase therefore is using Firabase Analytics which is different from the conventional Google Analytics.

This plugin is not suitable for those connected to Firebase.
I solved my problem by using this plugin instead: https://github.com/chemerisuk/cordova-plugin-firebase-analytics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants