-
Notifications
You must be signed in to change notification settings - Fork 109
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
What should be logging when debug is true #25
Comments
Me neither... But I'm using videojs 5 and this plugin seems to work with v4 only. So I guess that's the reason why I don't see any log |
I don't see this working in v5 either. Investigating. |
The plugin works with 5, the debug is working, but not outputting what is expected. I've modified my sendbeacon() function to work as expected. Also, note my plugin initialization. videojs('thing').ga({
'eventsToTrack': ['play', 'pause'],
'debug': true
}); sendbeacon = function(action, nonInteraction, value) {
if (window.ga) {
if (options.debug) {
console.log(action, value);
}
ga('send', 'event', {
'eventCategory': eventCategory,
'eventAction': action,
'eventLabel': eventLabel,
'eventValue': value,
'nonInteraction': nonInteraction
});
} else if (window._gaq) {
if (options.debug) {
console.log(action, value);
}
_gaq.push(['_trackEvent', eventCategory, action, eventLabel, value, nonInteraction]);
} else if (options.debug) {
console.log("Google Analytics not detected");
}
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What should I see in the console log when I have set debug to true in the options? I've tried but I'm not seeing anything at all for some reason.
The text was updated successfully, but these errors were encountered: