Comments (3)
How about you test in a clean project to confirm that something else isn't causing an issue.
cordova create analytics-test
cd analytics-test
cordova platform add ios
cordova plugin add https://github.com/cmackay/google-analytics-plugin.git
In the default cordova code after the device ready event occurs, add your tracking id and submit some analytics events. Give that a try and let me know if that works?
from google-analytics-plugin.
Will do, I will get back to you with the results. Thank you for the fast response.
from google-analytics-plugin.
Also when I test out the plugin, I run the above steps of creating a clean cordova project and then I edit the default index.js so it has the below:
...
if (id === 'deviceready') {
var analytics = navigator.analytics;
function onSuccess() {
alert('success');
}
function onError(err) {
alert('error' + err);
console.log(err);
}
analytics.setTrackingId('UA-XXXXXX-X');
analytics.sendAppView('home', onSuccess, onError);
}
...
Replace the default if (id === 'deviceready') statement with the above and you should see events logged in google analytics. Let me know how it works out.
from google-analytics-plugin.
Related Issues (20)
- analytic-test returns undefine HOT 7
- duplicate symbol while building for iOS HOT 4
- Phonegap Build HOT 6
- ERROR: Method 'setIDFAEnabled:' not defined in Plugin 'GoogleAnalytics' HOT 1
- IDFA HOT 1
- Install via npm HOT 3
- Not compatible with XDK cordova 5.1.1 iOS HOT 3
- Active page won't show in GA Real time HOT 3
- Add support for multiple trackers HOT 4
- Sound play issue while enable google-analytics object HOT 1
- Application carshes on Android HOT 1
- Invalid use of Google Play Services (+ a workround how to fix it) HOT 1
- How to get logs of all events? HOT 3
- Intel XDK does not recognise plugin HOT 1
- AllowIDFACollection callback never called in iOS HOT 3
- Build error [UNEXPECTED TOP-LEVEL EXCEPTION] HOT 5
- iOS: sendHitsInBackground ability? HOT 7
- App installs HOT 5
- Incompatibility with phonegap-plugin-push HOT 17
- cordova platform add fails HOT 1
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.