Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debugging #5

Closed
antonkomarev opened this issue Apr 6, 2015 · 1 comment
Closed

Add debugging #5

antonkomarev opened this issue Apr 6, 2015 · 1 comment

Comments

@antonkomarev
Copy link
Member

Documentation

Debugging

You can enable the debug version of analytics.js by using analytics_debug.js:

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics_debug.js','ga');
ga('create', 'UA-XXXX-Y', 'auto');
ga('send', 'pageview');

This should only be used temporarily or during development, as analytics_debug.js is larger and will delay hits to google-analytics.com.
Trace Debugging

Trace debugging will output more verbose information to the console. To enabled trace debugging, use https://www.google-analytics.com/analytics_debug.js and this line of code before the snippet.

window.ga_debug = {trace: true};
antonkomarev added a commit that referenced this issue Apr 19, 2015
Added tracking object configuration #10
Add plugins support (partial) #6
@antonkomarev
Copy link
Member Author

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant