danwilson / google-analytics-plugin

Cordova (PhoneGap) Plugin to connect to the native Google's Universal Analytics SDK 3.0
MIT License
693 stars 500 forks source link

Unable to configure this plugin with the new Google Analytics dashboard. #420

Open nikmartin opened 7 years ago

nikmartin commented 7 years ago

When you go to Google Analytics to create a new mobile app property, yoiu are now forwarded to Firebase with the notice that Firebase Analytics replaces Google Analytics for mobile. Does this mean we should just create a new 'web property' for use with this plugin instead of a new 'mobile property'?

victorsosa commented 7 years ago

The answer to the question is NO, because this plug-ins only works in the Google Analytics for mobile (except browser platform.) So with this new change; I think should be able to see the data in the Firebase; I didn't try this myself because it is a new change. If the portal doesn't works then it means that it will only works to receive data only from with the Firebase API(which I think it shouldn't be the case).

nsoojin commented 7 years ago

To use this, Create a property for Web and create views for mobile app. It works like a charm.

r12r commented 7 years ago

@nsoojin Can you explain your solution? Where do you create views for mobile app? Thanks!

ghost commented 7 years ago

Also wondering about this, I don't want to make clients have to set up a firebase account, and this plugin will probably not work with it.

ghost commented 7 years ago

Hey @r12r here are the steps

To set up app reporting using the Google Analytics Services SDK for iOS and Android, complete the following steps. Note that the Firebase SDK is the recommended tracking solution for Google Analytics.

Sign in to your Google Analytics account. Click Admin. In the PROPERTY column, select Create new property from the dropdown menu. Select Website. Provide a Website Name. You may use the name of your app. Provide a Website URL. You may use your company URL or the URL for your app’s marketing site. Click Get Tracking ID. In the VIEW column, select Create new view from the dropdown menu. Select Mobile app. Provide a Reporting View Name. Click Create View.

r12r commented 7 years ago

@JamesWilkinson-ICFOlson Works! Thank you very much.

anna-git commented 7 years ago

Thank you too @JamesWilkinson-ICFOlson, works like a charm. Maybe this could be added to the documentation, I had real trouble to understand how to configure the property,and I couldn't find any relevant information elsewhere.

victorsosa commented 7 years ago

Yes, some steps should be included int he documentation:

Prerequisites:

A Cordova 3.0+ project for iOS, Android, browser (PWA), and/or Windows Phone 8 A Mobile App property through the Google Analytics Admin Console (Android) Google Play Services SDK installed via Android SDK Manager

victorsosa commented 7 years ago

Reopen until we have the docs in place

viking2917 commented 6 years ago

Regarding the "Mobile App" approach - as mentioned, creating the Mobile App (vs website) approach forwards you to Firebase to enable Analytics. Having done that, the next step is to call something like $cordovaGoogleAnalytics.startTrackerWithId('UA-000000-01');

But how does one get the UA id? Google analytics no longer shows those for Firebase created accounts, at least that I can see?

royken commented 6 years ago

Hello @JamesWilkinson-ICFOlson I did exactly what you said, all the steps. I use version 1.8.3 of the plugin, It works perfectly on IOS but nothing shows with Android devices. This is my code : $cordovaGoogleAnalytics.startTrackerWithId('UA-XXXXXXXXX-2'); $cordovaGoogleAnalytics.debugMode(); $cordovaGoogleAnalytics.setUserId(USER_ID); $cordovaGoogleAnalytics.trackView('Page_Title');

When I try to see my app log, this is what i have: github

Danbardo commented 6 years ago

Hey all,

I just wanted to share my result.

The above solution worked for me perfectly, however, I could not see active pages in the real-time analytics. It took around 6 hours for the page view data to be visible on the analytics dashboard.

Thanks heaps guys!

Ludplay commented 6 years ago

Well, I apprecciate your sharing, @Danbardo. I've just did @JamesWilkinson-ICFOlson's steps but I couldn't do the trick. Before, it was showing just users number and no pages. Now it's showing nothing. I'll wait until tomorrow to analyze again. I think it's good to clarify these details here because many people will pass through this.

Ludplay commented 6 years ago

Sorry, my mistake! It's necessary to change the view at the top of Google Analytics's panel. Just now I got it. You will not see the real time views from App along with those from website. God, the tutorials around this implementation have nothing about these things... Doing this I am now seeing the users active and also the "time line", missing just the page name. I'm going to wait anyway.

Ludplay commented 6 years ago

Well, cheers! It worked! I retested after 4 days and in the first moment, opening Analytics and analyzing the real time, I saw no difference. So, I went to the Analytics Home Page and I saw the views on the report. So, I tried again and the page finally appeared in the real time. Hope this helps someone.

bigreni commented 6 years ago

Hi @Ludplay,

It has been 48 hours and I am still not seeing any data (not even in real-time). Even the Tracking Code section says No data received in the past 48 hours. Did you experience something similar? How long did it take you to start seeing data?

cgs commented 5 years ago

Just want to add that this method is also the secret sauce for the browser platform. Once I added a mobile view, my trackView calls all started showing up in both real-time and reports. Note that if you are looking at the report you may need to change the filter to include the current day to see the data. Thanks @JamesWilkinson-ICFOlson !

So in summary - create a GA web property, with a mobile view inside it. Clear as mud!