Comments (13)
me too. Google analytics mobile app real time is very slow when use this plugin.
from google-analytics-plugin.
me too, is this fork active develop?
from google-analytics-plugin.
There are several reports of this. I'm still investigating, but currently it does not appear to be a problem with the plugin itself.
from google-analytics-plugin.
The same for me.
In the Phonegap GAPlugin, it's possible to define delay between upload values, in gaPlugin.init();
from google-analytics-plugin.
I don't know of this will contribute to the root cause, but I have, oddly, noticed that this plugin works great on iOS, but android is having a difficult time sending the hits out of the app. This is the console output I am getting repeatedly as I jump to different views:
01-27 15:58:13.912 4250-4529/com.example.app V/GAV3﹕ Thread[GAThread,5,main]: putHit called
01-27 15:58:13.922 4250-4529/com.example.app V/GAV3﹕ Thread[GAThread,5,main]: Sending hit to service PATH: https: PARAMS: v=1, ul=en-us, t=appview, ht=1422392293925, sr=1080x1920, an=Example, tid=UA-123456789-6, aid=com.example.app, cid=d1873b0c-1994-4497-9bdb-561b444535e7, av=1.0.0, _u=.r3oK-AL, cd=651226 - Title of view,
01-27 15:58:13.932 4250-4332/com.example.app W/PluginManager﹕ THREAD WARNING: exec() call to UniversalAnalytics.trackView blocked the main thread for 20ms. Plugin should use CordovaInterface.getThreadPool().
This is what I get when I initiate the app:
01-27 15:49:02.344 4250-4529/com.example.app V/GAV3﹕ Thread[GAThread,5,main]: connecting to Analytics service
01-27 15:49:02.354 4250-4529/com.example.app V/GAV3﹕ Thread[GAThread,5,main]: connect: bindService returned true for Intent { act=com.google.android.gms.analytics.service.START cmp=com.google.android.gms/.analytics.service.AnalyticsService (has extras) }
01-27 15:49:02.354 4250-4529/com.example.app V/GAV3﹕ Thread[GAThread,5,main]: Loaded clientId
01-27 15:49:02.354 4250-4529/com.example.app I/GAV3﹕ Thread[GAThread,5,main]: No campaign data found.
01-27 15:49:02.354 4250-4529/com.example.app V/GAV3﹕ Thread[GAThread,5,main]: putHit called
Note: I did replace the domain name with 'example' in each log entry.
When I come back from a soda break, I sometimes see the results in my console (so I think it's either heavily delayed or network connectivity is pretty slow). Just my observations, though. There may be a chance it might be platform specific, too.
iOS does exhibit a success hit whenever Google receives the impressions:
GoogleAnalytics 3.07 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:167): 1 hit(s) sent
Don't think the message is the same on both platforms, but I am not getting anything like that on the Android platform.
from google-analytics-plugin.
Did anyone find a solution to this, my app's analytics seem to be a hit or miss, cant be used reliably
from google-analytics-plugin.
Bump. +1 for slow Android.
from google-analytics-plugin.
I'm using the PlugIn v0.8.0 and I'm currently experiencing the same issue with Android (i.e. Real-Time doesn't work on GA). I can also confirm that it's working fine with iOS.
According to my investigation I did a small change on the PlugIn class UniversalAnalyticsPlugin.
I changed the method StartTracker by adding a call to reportActivityStart like this:
private void startTracker(String id, CallbackContext callbackContext) {
if (null != id && id.length() > 0) {
tracker = GoogleAnalytics.getInstance(this.cordova.getActivity()).newTracker(id);
callbackContext.success("tracker started");
trackerStarted = true;
GoogleAnalytics.getInstance(this.cordova.getActivity()).setLocalDispatchPeriod(30);
GoogleAnalytics.getInstance(this).reportActivityStart(this);
} else {
callbackContext.error("tracker id is not valid");
}
}
By updating the project with this change the Real-Time is now working on GA.
from google-analytics-plugin.
Thanks TompiT. Couldn't get reportActivityStart to compile but it did lead me to the right place.
I changed the time period of the setLocalDispatchPeriod method to 1 minute instead of 30. It appears to store tracking in local storage and then dispatches it to GA every xx minutes. Not sure what happens if the app is closed before the time period expires, so if it was set to 30 minutes and I closed my app after 29 would the local storage be cleared and nothing sent to GA? Any how, changing it to 1 minute I get all the real time stats in GA.
https://developers.google.com/analytics/devguides/collection/android/v3/dispatch
from google-analytics-plugin.
Hey I'm getting W/CordovaPlugin(14449): Attempted to send a second callback for ID: UniversalAnalyticsXXXXXXXX
for some reason everytime I leave and come back to the page being tracked. Any ideas?
from google-analytics-plugin.
@gobalistik Your fix worked for me, it caused my android events to show up in real-time reports.
Changing setLocalDispatchPeriod(30) to setLocalDispatchPeriod(1) in UniversalAnalyticsPlugin.java in method startTracker() did the trick.
from google-analytics-plugin.
Is this fix going to be put in the main plugin?
from google-analytics-plugin.
this was fixed
from google-analytics-plugin.
Related Issues (20)
- Not able to see any results in google analytics console HOT 2
- AJAX Single Pages not work
- Conflict error between cordova-plugin-google-analytics and cordova-plugin-geolocation. HOT 1
- Configuring play-services version on capacitor HOT 2
- Does this plugin work with the new Google Analytics 4? HOT 27
- Best practice suggestion, Change the @ connection to be an & instead. HOT 1
- Google Analytics and iOS 14.5 ATT requirements HOT 2
- Target has transitive dependencies that include statically linked binaries HOT 7
- Is it possible to create multiple instance for Google Analytics in iOS HOT 1
- Facing build error on Apple M1 Pro chip Mac Xcode, while choosing iOS Simulator. Issue only on build for simulator's, working fine for real devices. HOT 4
- Android startTrackerWithId call returns "" from nativeApiProvider.get().exec(bridgeSecret, service, action, callbackId, argsJson)
- iOS - Error while installing the plugin HOT 2
- Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#com.google.android.gms.analytics.AnalyticsReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined HOT 2
- Android Build Failed HOT 13
- targeting Android 31 cause crash in some phones HOT 3
- Which plugin to use GA4 ? HOT 8
- Android 12 error Targeting S+ HOT 12
- Error about non-public selectors when validating HOT 2
- 1.9.3 release needed HOT 17
- Plugging getting error for Android 12 due to :capacitor-cordova-android-plugins:processReleaseManifest execution failed HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-analytics-plugin.