This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sources: https://segment.io/libraries/analytics.js#getting-started | |
// https://github.com/phillbaker/analytics-js-rails/blob/master/app/views/analytics-js/_loader.html.erb | |
// Create a queue, but don't obliterate an existing one! | |
window.analytics || (window.analytics = []); | |
// A list of all the methods in analytics.js that we want to stub. | |
window.analytics.methods = ['identify', 'track', 'trackLink', 'trackForm', | |
'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', | |
'group', 'on', 'once', 'off']; |