trackView rejects with throwing an error
See original GitHub issueI am using this plugin with ionic. (latest version of everything)
I have this code: start tracking -> track view “test”
GoogleAnalytics.startTrackerWithId(config.googleAnalytics).then(
res => {
console.log("startTrackerWithId res", res);
GoogleAnalytics.trackView("test").then(
res => console.log("trackView res", res),
error => console.log("trackView error", error),
);
},
error => console.log("startTrackerWithId error", error)
);
And the console output is:
trackView error Error: send timeout
at http://localhost:8000/plugins/cordova-plugin-google-analytics/browser/UniversalAnalyticsProxy.js:170:13
at t.invokeTask (http://localhost:8000/build/polyfills.js:3:9723)
at Object.onInvokeTask (http://localhost:8000/build/main.js:40846:37)
at t.invokeTask (http://localhost:8000/build/polyfills.js:3:9659)
at e.runTask (http://localhost:8000/build/polyfills.js:3:7083)
at invoke (http://localhost:8000/build/polyfills.js:3:10836)
at e.args.(anonymous function) (http://localhost:8000/build/polyfills.js:2:30123)
Am I doing something wrong?
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (5 by maintainers)
Top Results From Across the Web
Ionic 4 + Google Analytics plugin: trackView does not work
trackView('App component') .then(() => { console.log('track view')}) ... view')' is being called, in other words, no error is being thrown.
Read more >Problem tracker not started - Ionic Forum
Hi, I have a problem, but I do not know what's happening. Error on console: ERROR: Unhandled Promise rejection: Tracker not started ;...
Read more >FAQs
I ran into a "file corrupted" error when installing the PC version. How to fix it? It means your download is not completed,...
Read more >Google Analytics Send Timeout in Ionic - Damir's Corner
Fixing the Issue. Thanks to all the console.log() calls in my code, I figured out that the send timeout error was thrown because ......
Read more >tracing/tracing/ui/timeline_view.html - catapult
querySelector(. '#track_view_container');. if (!this.trackViewContainer_) {. throw new Error('missing trackviewContainer');. } if (this.queuedModel_) this.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into the same thing. It’s a documentation problem. There’s no note to tell you that you need to have the GA code in your index.html as well! You would think installation of a plugin would handle everything for you, but it doesn’t. You still need code in your index.html. Copy it from the GA dashboard and paste it in.
@martyzz1 it returns a promise on ionic2: https://ionicframework.com/docs/v2/native/google-analytics/