question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

trackView rejects with throwing an error

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:26 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
morrisonbrettcommented, Jan 8, 2017

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.

1reaction
joekukishcommented, Jan 11, 2017
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found