{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/constants.js","autotrack.js","lib/plugins/event-tracker.js","lib/plugins/media-query-tracker.js","lib/plugins/outbound-form-tracker.js","lib/plugins/outbound-link-tracker.js","lib/plugins/social-tracker.js","lib/plugins/url-change-tracker.js","lib/provide.js","lib/utilities.js","node_modules/closest/index.js","node_modules/date-now/index.js","node_modules/debounce/index.js","node_modules/delegate/src/delegate.js","node_modules/matches-selector/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length",1,"module","DEV_ID",2,"EventTracker","tracker","opts","window","gaplugins","addEventListener","this","defaults","attributePrefix","prefix","selector","delegate","document","handleEventClicks","bind","provide","prototype","event","link","delegateTarget","send","eventCategory","getAttribute","eventAction","eventLabel","eventValue","../provide","../utilities",3,"MediaQueryTracker","matchMedia","mediaQueryDefinitions","mediaQueryChangeTemplate","changeTemplate","mediaQueryChangeTimeout","isObject","toArray","timeouts","processMediaQueries","getMediaListener","media","mediaMap","debounce","NULL_DIMENSION","forEach","dimension","dimensionIndex","name","getMatchName","set","addChangeListeners","match","items","item","matches","mql","addListener","handleChanges","newValue","oldValue","get",4,"OutboundFormTracker","shouldTrackOutboundForm","handleFormSubmits","utilities","form","action","fieldsObj","transport","navigator","sendBeacon","preventDefault","hitCallback","withTimeout","submit","indexOf","location","hostname",5,"OutboundLinkTracker","shouldTrackOutboundLink","handleLinkClicks","target","href",6,"SocialTracker","handleSocialClicks","detectLibraryLoad","addFacebookEventHandlers","addTwitterEventHandlers","socialNetwork","socialAction","socialTarget","namespace","domId","done","script","getElementById","onload","twttr","ready","events","region","url","data","screenName","screen_name","err","FB","Event","subscribe",7,"UrlChangeTracker","history","pushState","shouldTrackUrlChange","path","getPath","originalPushState","state","title","updateTrackerData","originalReplaceState","replaceState","pathname","search","shouldSendPageview","setTimeout","oldPath","newPath","page",8,"constants","gaDevIds","push","pluginName","pluginConstructor","w","g","GoogleAnalyticsObject","q","arguments","Date","./constants",9,"callback","wait","called","overrides","result","key","hasOwnProperty","obj","isArray","Array","arr","Object","toString",10,"element","checkYoSelf","parent","parentNode","matches-selector",11,"now","getTime",12,"func","immediate","later","last","timestamp","timeout","apply","context","args","callNow","date-now",13,"type","useCapture","listenerFn","listener","destroy","removeEventListener","closest",14,"el","vendor","nodes","querySelectorAll","proto","Element","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector",15,"Autotrack","ga","./event-tracker","./media-query-tracker","./outbound-form-tracker","./outbound-link-tracker","./social-tracker","./url-change-tracker"],"mappings":";;;;;;;;;;;;;;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAAAF,EAAAA,EAAAF,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,MAAAD,GAAAG,GAAAS,QAAA,IAAA,GAAAL,GAAA,kBAAAD,UAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,GAAA,OAAAD,KAAAa,GAAA,SAAAT,EAAAU,EAAAJ,GCiBAI,EAAAJ,SACAK,OAAA,eCIMC,GAAG,SAASZ,EAAQU,EAAOJ,GCMjC,QAAAO,GAAAC,EAAAC,GAOA,GAJAC,OAAAC,UAAAD,OAAAC,cACAA,UAAAJ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,EAAA2M,EAAApM,SAAAP,EACA,GAAA2M,EAAA3M,IAAAyM,EAAA,OAAA,CAEA,QAAA,EAjCA,GAAAI,GAAAC,QAAAlL,UAMA8K,EAAAG,EAAAE,iBACAF,EAAAG,uBACAH,EAAAI,oBACAJ,EAAAK,mBACAL,EAAAM,gBAMA1M,GAAAJ,QAAA0D,Obq+BMqJ,IAAI,SAASrN,EAAQU,EAAOJ,GAqClC,QAASgN,GAAUxM,EAASC,GAC1B,GAAIwM,GAAKvM,OAAOA,OAAOyI,uBAAyB,MAC5C7F,EAAO9C,EAAQ2D,IAAI,OAGvBzD,QAAOC,UAAYD,OAAOC,cAC1BA,UAAUqM,UAAYA,EAEtBC,EAAG3J,EAAO,WAAY,eAAgB7C,GACtCwM,EAAG3J,EAAO,WAAY,oBAAqB7C,GAC3CwM,EAAG3J,EAAO,WAAY,sBAAuB7C,GAC7CwM,EAAG3J,EAAO,WAAY,sBAAuB7C,GAC7CwM,EAAG3J,EAAO,WAAY,gBAAiB7C,GACvCwM,EAAG3J,EAAO,WAAY,mBAAoB7C,GAhC5Cf,EAAQ,mBACRA,EAAQ,yBACRA,EAAQ,2BACRA,EAAQ,2BACRA,EAAQ,oBACRA,EAAQ,uBAIR,IAAI4B,GAAU5B,EAAQ,aA2BtB4B,GAAQ,YAAa0L,KAElB/K,aAAa,EAAEiL,kBAAkB,EAAEC,wBAAwB,EAAEC,0BAA0B,EAAEC,0BAA0B,EAAEC,mBAAmB,EAAEC,uBAAuB,SAAS","file":"autotrack.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o ' + newValue;\n};\n\n\n\n/**\n * Accepts a media query and returns a MediaQueryListener object.\n * Caches the values to avoid multiple unnecessary instances.\n * @param {string} media A media query value.\n * @return {MediaQueryListener}\n */\nfunction getMediaListener(media) {\n // Returns early if the media is cached.\n if (mediaMap[media]) return mediaMap[media];\n\n mediaMap[media] = window.matchMedia(media);\n return mediaMap[media];\n}\n\n\nprovide('mediaQueryTracker', MediaQueryTracker);\n\n},{\"../provide\":8,\"../utilities\":9,\"debounce\":12}],4:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar delegate = require('delegate');\nvar provide = require('../provide');\nvar utilities = require('../utilities');\n\n\n/**\n * Registers outbound form tracking.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction OutboundFormTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.OutboundFormTracker = OutboundFormTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n shouldTrackOutboundForm: this.shouldTrackOutboundForm\n });\n\n this.tracker = tracker;\n\n delegate(document, 'form', 'submit', this.handleFormSubmits.bind(this));\n}\n\n\n/**\n * Handles all submits on form elements. A form submit is considered outbound\n * if its action attribute starts with http and does not contain\n * location.hostname.\n * When the beacon transport method is not available, the event's default\n * action is prevented and re-emitted after the hit is sent.\n * @param {Event} event The DOM submit event.\n */\nOutboundFormTracker.prototype.handleFormSubmits = function(event) {\n\n var form = event.delegateTarget;\n var action = form.getAttribute('action');\n var fieldsObj = {transport: 'beacon'};\n\n if (this.opts.shouldTrackOutboundForm(form)) {\n\n if (!navigator.sendBeacon) {\n // Stops the submit and waits until the hit is complete (with timeout)\n // for browsers that don't support beacon.\n event.preventDefault();\n fieldsObj.hitCallback = utilities.withTimeout(function() {\n form.submit();\n });\n }\n\n this.tracker.send('event', 'Outbound Form', 'submit', action, fieldsObj);\n }\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit when a form is\n * submitted. By default, forms with an action attribute that starts with\n * \"http\" and doesn't contain the current hostname are tracked.\n * @param {Element} form The form that was submitted.\n * @return {boolean} Whether or not the form should be tracked.\n */\nOutboundFormTracker.prototype.shouldTrackOutboundForm = function(form) {\n var action = form.getAttribute('action');\n return action &&\n action.indexOf('http') === 0 &&\n action.indexOf(location.hostname) < 0;\n};\n\n\nprovide('outboundFormTracker', OutboundFormTracker);\n\n},{\"../provide\":8,\"../utilities\":9,\"delegate\":13}],5:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar delegate = require('delegate');\nvar provide = require('../provide');\n\n\n/**\n * Registers outbound link tracking on a tracker object.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction OutboundLinkTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.OutboundLinkTracker = OutboundLinkTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n shouldTrackOutboundLink: this.shouldTrackOutboundLink\n });\n\n this.tracker = tracker;\n\n delegate(document, 'a', 'click', this.handleLinkClicks.bind(this));\n}\n\n\n/**\n * Handles all clicks on link elements. A link is considered an outbound link\n * its hostname property does not match location.hostname. When the beacon\n * transport method is not available, the links target is set to \"_blank\" to\n * ensure the hit can be sent.\n * @param {Event} event The DOM click event.\n */\nOutboundLinkTracker.prototype.handleLinkClicks = function(event) {\n var link = event.delegateTarget;\n if (this.opts.shouldTrackOutboundLink(link)) {\n // Opens outbound links in a new tab if the browser doesn't support\n // the beacon transport method.\n if (!navigator.sendBeacon) {\n link.target = '_blank';\n }\n this.tracker.send('event', 'Outbound Link', 'click', link.href, {\n transport: 'beacon'\n });\n }\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit when a link is\n * clicked. By default links with a hostname property not equal to the current\n * hostname are tracked.\n * @param {Element} link The link that was clicked on.\n * @return {boolean} Whether or not the link should be tracked.\n */\nOutboundLinkTracker.prototype.shouldTrackOutboundLink = function(link) {\n return link.hostname != location.hostname;\n};\n\n\nprovide('outboundLinkTracker', OutboundLinkTracker);\n\n},{\"../provide\":8,\"../utilities\":9,\"delegate\":13}],6:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar delegate = require('delegate');\nvar provide = require('../provide');\n\n\n/**\n * Registers social tracking on tracker object.\n * Supports both declarative social tracking via HTML attributes as well as\n * tracking for social events when using official Twitter or Facebook widgets.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction SocialTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.SocialTracker = SocialTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n attributePrefix: 'data-'\n });\n\n this.tracker = tracker;\n\n var prefix = this.opts.attributePrefix;\n var selector = '[' + prefix + 'social-network]' +\n '[' + prefix + 'social-action]' +\n '[' + prefix + 'social-target]';\n\n delegate(document, selector, 'click', this.handleSocialClicks.bind(this));\n\n this.detectLibraryLoad('FB', 'facebook-jssdk',\n this.addFacebookEventHandlers.bind(this));\n\n this.detectLibraryLoad('twttr', 'twitter-wjs',\n this.addTwitterEventHandlers.bind(this));\n}\n\n\n/**\n * Handles all clicks on elements with social tracking attributes.\n * @param {Event} event The DOM click event.\n */\nSocialTracker.prototype.handleSocialClicks = function(event) {\n\n var link = event.delegateTarget;\n var prefix = this.opts.attributePrefix;\n\n this.tracker.send('social', {\n socialNetwork: link.getAttribute(prefix + 'social-network'),\n socialAction: link.getAttribute(prefix + 'social-action'),\n socialTarget: link.getAttribute(prefix + 'social-target')\n });\n};\n\n\n/**\n * A utility method that determines when a social library is finished loading.\n * @param {string} namespace The global property name added to window.\n * @param {string} domId The ID of a script element in the DOM.\n * @param {Function} done A callback to be invoked when done.\n */\nSocialTracker.prototype.detectLibraryLoad = function(namespace, domId, done) {\n if (window[namespace]) {\n done();\n }\n else {\n var script = document.getElementById(domId);\n if (script) {\n script.onload = done;\n }\n }\n};\n\n\n/**\n * Adds event handlers for the \"tweet\" and \"follow\" events emitted by the\n * official tweet and follow buttons. Note: this does not capture tweet or\n * follow events emitted by other Twitter widgets (tweet, timeline, etc.).\n */\nSocialTracker.prototype.addTwitterEventHandlers = function() {\n try {\n twttr.ready(function() {\n\n twttr.events.bind('tweet', function(event) {\n // Ignore tweets from widgets that aren't the tweet button.\n if (event.region != 'tweet') return;\n\n var url = event.data.url || event.target.getAttribute('data-url') ||\n location.href;\n\n this.tracker.send('social', 'Twitter', 'tweet', url);\n }.bind(this));\n\n twttr.events.bind('follow', function(event) {\n // Ignore follows from widgets that aren't the follow button.\n if (event.region != 'follow') return;\n\n var screenName = event.data.screen_name ||\n event.target.getAttribute('data-screen-name');\n\n this.tracker.send('social', 'Twitter', 'follow', screenName);\n }.bind(this));\n }.bind(this));\n } catch(err) {}\n};\n\n\n/**\n * Adds event handlers for the \"like\" and \"unlike\" events emitted by the\n * official Facebook like button.\n */\nSocialTracker.prototype.addFacebookEventHandlers = function() {\n try {\n FB.Event.subscribe('edge.create', function(url) {\n this.tracker.send('social', 'Facebook', 'like', url);\n }.bind(this));\n\n FB.Event.subscribe('edge.remove', function(url) {\n this.tracker.send('social', 'Facebook', 'unlike', url);\n }.bind(this));\n } catch(err) {}\n};\n\n\nprovide('socialTracker', SocialTracker);\n\n},{\"../provide\":8,\"../utilities\":9,\"delegate\":13}],7:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar isObject = require('../utilities').isObject;\nvar provide = require('../provide');\n\n\n/**\n * Adds handler for the history API methods\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction UrlChangeTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.UrlChangeTracker = UrlChangeTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!history.pushState || !window.addEventListener) return;\n\n this.opts = defaults(opts, {\n shouldTrackUrlChange: this.shouldTrackUrlChange\n });\n\n this.tracker = tracker;\n\n // Sets the initial page field.\n // Don't set this on the tracker yet so campaign data can be retreived\n // from the location field.\n this.path = getPath();\n\n // Overrides history.pushState.\n var originalPushState = history.pushState;\n history.pushState = function(state, title, url) {\n // Sets the document title for reference later.\n // TODO(philipwalton): consider using WeakMap for this to not conflict\n // with any user-defined property also called \"title\".\n if (isObject(state) && title) state.title = title;\n\n originalPushState.call(history, state, title, url);\n this.updateTrackerData();\n }.bind(this);\n\n // Overrides history.repaceState.\n var originalReplaceState = history.replaceState;\n history.replaceState = function(state, title, url) {\n // Sets the document title for reference later.\n // TODO(philipwalton): consider using WeakMap for this to not conflict\n // with any user-defined property also called \"title\".\n if (isObject(state) && title) state.title = title;\n\n originalReplaceState.call(history, state, title, url);\n this.updateTrackerData(false);\n }.bind(this);\n\n // Handles URL changes via user interaction.\n window.addEventListener('popstate', this.updateTrackerData.bind(this));\n}\n\n\n/**\n * Updates the page and title fields on the tracker if necessary and\n * optionally sends a pageview.\n */\nUrlChangeTracker.prototype.updateTrackerData = function(shouldSendPageview) {\n\n // Sets the default.\n shouldSendPageview = shouldSendPageview === false ? false : true;\n\n // Calls the update logic asychronously to help ensure user callbacks\n // happen first.\n setTimeout(function() {\n\n var oldPath = this.path;\n var newPath = getPath();\n\n if (oldPath != newPath &&\n this.opts.shouldTrackUrlChange.call(this, newPath, oldPath)) {\n\n this.path = newPath;\n this.tracker.set({\n page: newPath,\n title: isObject(history.state) && history.state.title || document.title\n });\n\n if (shouldSendPageview) this.tracker.send('pageview');\n }\n }.bind(this), 0);\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit with the new page\n * data. This default implementation can be overrided in the config options.\n * @param {string} newPath\n * @param {string} oldPath\n * @return {boolean}\n */\nUrlChangeTracker.prototype.shouldTrackUrlChange = function(newPath, oldPath) {\n return true;\n};\n\n\n/**\n * Returns the path value of the current URL.\n * @return {string}\n */\nfunction getPath() {\n return location.pathname + location.search;\n}\n\n\nprovide('urlChangeTracker', UrlChangeTracker);\n\n},{\"../provide\":8,\"../utilities\":9}],8:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar constants = require('./constants');\n\n\n// Adds the dev ID to the list of dev IDs if any plugin is used.\n(window.gaDevIds = window.gaDevIds || []).push(constants.DEV_ID);\n\n\n/**\n * Provides a plugin for use with analytics.js, accounting for the possibility\n * that the global command queue has been renamed.\n * @param {string} pluginName The plugin name identifier.\n * @param {Function} pluginConstructor The plugin constructor function.\n */\nmodule.exports = function providePlugin(pluginName, pluginConstructor) {\n var w = window;\n var g = w.GoogleAnalyticsObject || 'ga';\n\n // Creates the global command queue if it's not defined.\n w[g] = w[g] || function(){(w[g].q=w[g].q||[]).push(arguments)};\n w[g].l = w[g].l || +new Date;\n\n w[g]('provide', pluginName, pluginConstructor);\n};\n\n},{\"./constants\":1}],9:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar utilities = {\n\n /**\n * Accepts a function and returns a wrapped version of the function that is\n * expected to be called elsewhere in the system. If it's not called\n * elsewhere after the timeout period, it's called regardless. The wrapper\n * function also prevents the callback from being called more than once.\n * @param {Function} callback The function to call.\n * @param {number} wait How many milliseconds to wait before invoking\n * the callback.\n */\n withTimeout: function(callback, wait) {\n var called = false;\n setTimeout(callback, wait || 2000);\n return function() {\n if (!called) {\n called = true;\n callback();\n }\n };\n },\n\n\n /**\n * Accepts an object of overrides and defaults and returns a new object\n * with the values merged. For each key in defaults, if there's a\n * corresponding value in overrides, it gets used.\n * @param {Object} overrides.\n * @param {?Object} defaults.\n */\n defaults: function(overrides, defaults) {\n var result = {};\n\n if (typeof overrides != 'object') {\n overrides = {};\n }\n\n if (typeof defaults != 'object') {\n defaults = {};\n }\n\n for (var key in defaults) {\n if (defaults.hasOwnProperty(key)) {\n result[key] = overrides.hasOwnProperty(key) ?\n overrides[key] : defaults[key];\n }\n }\n return result;\n },\n\n\n isObject: function(obj) {\n return typeof obj == 'object' && obj !== null;\n },\n\n\n isArray: Array.isArray || function(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]';\n },\n\n\n toArray: function(obj) {\n return utilities.isArray(obj) ? obj : [obj];\n }\n};\n\nmodule.exports = utilities;\n\n},{}],10:[function(require,module,exports){\nvar matches = require('matches-selector')\r\n\r\nmodule.exports = function (element, selector, checkYoSelf) {\r\n var parent = checkYoSelf ? element : element.parentNode\r\n\r\n while (parent && parent !== document) {\r\n if (matches(parent, selector)) return parent;\r\n parent = parent.parentNode\r\n }\r\n}\r\n\n},{\"matches-selector\":14}],11:[function(require,module,exports){\nmodule.exports = Date.now || now\n\nfunction now() {\n return new Date().getTime()\n}\n\n},{}],12:[function(require,module,exports){\n\n/**\n * Module dependencies.\n */\n\nvar now = require('date-now');\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n\nmodule.exports = function debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = now() - timestamp;\n\n if (last < wait && last > 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function debounced() {\n context = this;\n args = arguments;\n timestamp = now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n};\n\n},{\"date-now\":11}],13:[function(require,module,exports){\nvar closest = require('closest');\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector, true);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n},{\"closest\":10}],14:[function(require,module,exports){\n\r\n/**\r\n * Element prototype.\r\n */\r\n\r\nvar proto = Element.prototype;\r\n\r\n/**\r\n * Vendor function.\r\n */\r\n\r\nvar vendor = proto.matchesSelector\r\n || proto.webkitMatchesSelector\r\n || proto.mozMatchesSelector\r\n || proto.msMatchesSelector\r\n || proto.oMatchesSelector;\r\n\r\n/**\r\n * Expose `match()`.\r\n */\r\n\r\nmodule.exports = match;\r\n\r\n/**\r\n * Match `el` to `selector`.\r\n *\r\n * @param {Element} el\r\n * @param {String} selector\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nfunction match(el, selector) {\r\n if (vendor) return vendor.call(el, selector);\r\n var nodes = el.parentNode.querySelectorAll(selector);\r\n for (var i = 0; i < nodes.length; ++i) {\r\n if (nodes[i] == el) return true;\r\n }\r\n return false;\r\n}\n},{}],15:[function(require,module,exports){\n/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Imports sub-plugins.\nrequire('./event-tracker');\nrequire('./media-query-tracker');\nrequire('./outbound-form-tracker');\nrequire('./outbound-link-tracker');\nrequire('./social-tracker');\nrequire('./url-change-tracker');\n\n\n// Imports dependencies.\nvar provide = require('../provide');\n\n\n/**\n *\n * Requires all sub-plugins via a single plugin.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction Autotrack(tracker, opts) {\n var ga = window[window.GoogleAnalyticsObject || 'ga'];\n var name = tracker.get('name');\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.Autotrack = Autotrack;\n\n ga(name + '.require', 'eventTracker', opts);\n ga(name + '.require', 'mediaQueryTracker', opts);\n ga(name + '.require', 'outboundFormTracker', opts);\n ga(name + '.require', 'outboundLinkTracker', opts);\n ga(name + '.require', 'socialTracker', opts);\n ga(name + '.require', 'urlChangeTracker', opts);\n}\n\n\nprovide('autotrack', Autotrack);\n\n},{\"../provide\":8,\"./event-tracker\":2,\"./media-query-tracker\":3,\"./outbound-form-tracker\":4,\"./outbound-link-tracker\":5,\"./social-tracker\":6,\"./url-change-tracker\":7}]},{},[15])\n\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar delegate = require('delegate');\nvar defaults = require('../utilities').defaults;\nvar provide = require('../provide');\n\n\n/**\n * Registers declarative event tracking.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction EventTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.EventTracker = EventTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n attributePrefix: 'data-'\n });\n\n this.tracker = tracker;\n\n var prefix = this.opts.attributePrefix;\n var selector = '[' + prefix + 'event-category][' + prefix + 'event-action]';\n\n delegate(document, selector, 'click', this.handleEventClicks.bind(this));\n}\n\n\n/**\n * Handles all clicks on elements with event attributes.\n * @param {Event} event The DOM click event.\n */\nEventTracker.prototype.handleEventClicks = function(event) {\n\n var link = event.delegateTarget;\n var prefix = this.opts.attributePrefix;\n\n this.tracker.send('event', {\n eventCategory: link.getAttribute(prefix + 'event-category'),\n eventAction: link.getAttribute(prefix + 'event-action'),\n eventLabel: link.getAttribute(prefix + 'event-label'),\n eventValue: link.getAttribute(prefix + 'event-value')\n });\n};\n\n\nprovide('eventTracker', EventTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar debounce = require('debounce');\nvar defaults = require('../utilities').defaults;\nvar isObject = require('../utilities').isObject;\nvar toArray = require('../utilities').toArray;\nvar provide = require('../provide');\n\n\n/**\n * Sets the string to use when no custom dimension value is available.\n */\nvar NULL_DIMENSION = '(not set)';\n\n\n/**\n * Declares the MediaQueryListener instance cache.\n */\nvar mediaMap = {};\n\n\n/**\n * Registers media query tracking.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction MediaQueryTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.MediaQueryTracker = MediaQueryTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.matchMedia) return;\n\n this.opts = defaults(opts, {\n mediaQueryDefinitions: false,\n mediaQueryChangeTemplate: this.changeTemplate,\n mediaQueryChangeTimeout: 1000\n });\n\n // Exits early if media query data doesn't exist.\n if (!isObject(this.opts.mediaQueryDefinitions)) return;\n\n this.opts.mediaQueryDefinitions = toArray(this.opts.mediaQueryDefinitions);\n this.tracker = tracker;\n this.timeouts = {};\n\n this.processMediaQueries();\n}\n\n\n/**\n * Loops through each media query definition, sets the custom dimenion data,\n * and adds the change listeners.\n */\nMediaQueryTracker.prototype.processMediaQueries = function() {\n this.opts.mediaQueryDefinitions.forEach(function(dimension) {\n\n if (!dimension.dimensionIndex) {\n throw new Error('Media query definitions must have a name.');\n }\n\n if (!dimension.dimensionIndex) {\n throw new Error('Media query definitions must have a dimension index.');\n }\n\n var name = this.getMatchName(dimension);\n this.tracker.set('dimension' + dimension.dimensionIndex, name);\n\n this.addChangeListeners(dimension);\n }.bind(this));\n};\n\n\n/**\n * Takes a dimension object and return the name of the matching media item.\n * If no match is found, the NULL_DIMENSION value is returned.\n * @param {Object} dimension A set of named media queries associated\n * with a single custom dimension.\n * @return {string} The name of the matched media or NULL_DIMENSION.\n */\nMediaQueryTracker.prototype.getMatchName = function(dimension) {\n var match;\n\n dimension.items.forEach(function(item) {\n if (getMediaListener(item.media).matches) {\n match = item;\n }\n });\n return match ? match.name : NULL_DIMENSION;\n};\n\n\n/**\n * Adds change listeners to each media query in the dimension list.\n * Debounces the changes to prevent unnecessary hits from being sent.\n * @param {Object} dimension A set of named media queries associated\n * with a single custom dimension\n */\nMediaQueryTracker.prototype.addChangeListeners = function(dimension) {\n dimension.items.forEach(function(item) {\n var mql = getMediaListener(item.media);\n mql.addListener(debounce(function() {\n this.handleChanges(dimension);\n }.bind(this), this.opts.mediaQueryChangeTimeout));\n }.bind(this));\n};\n\n\n/**\n * Handles changes to the matched media. When the new value differs from\n * the old value, a change event is sent.\n * @param {Object} dimension A set of named media queries associated\n * with a single custom dimension\n */\nMediaQueryTracker.prototype.handleChanges = function(dimension) {\n var newValue = this.getMatchName(dimension);\n var oldValue = this.tracker.get('dimension' + dimension.dimensionIndex);\n\n if (newValue !== oldValue) {\n this.tracker.set('dimension' + dimension.dimensionIndex, newValue);\n this.tracker.send('event', dimension.name, 'change',\n this.opts.mediaQueryChangeTemplate(oldValue, newValue));\n }\n};\n\n\n/**\n * Sets the default formatting of the change event label.\n * This can be overridden by setting the `mediaQueryChangeTemplate` option.\n * @param {string} oldValue\n * @param {string} newValue\n * @return {string} The formatted event label.\n */\nMediaQueryTracker.prototype.changeTemplate = function(oldValue, newValue) {\n return oldValue + ' => ' + newValue;\n};\n\n\n\n/**\n * Accepts a media query and returns a MediaQueryListener object.\n * Caches the values to avoid multiple unnecessary instances.\n * @param {string} media A media query value.\n * @return {MediaQueryListener}\n */\nfunction getMediaListener(media) {\n // Returns early if the media is cached.\n if (mediaMap[media]) return mediaMap[media];\n\n mediaMap[media] = window.matchMedia(media);\n return mediaMap[media];\n}\n\n\nprovide('mediaQueryTracker', MediaQueryTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar delegate = require('delegate');\nvar provide = require('../provide');\nvar utilities = require('../utilities');\n\n\n/**\n * Registers outbound form tracking.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction OutboundFormTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.OutboundFormTracker = OutboundFormTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n shouldTrackOutboundForm: this.shouldTrackOutboundForm\n });\n\n this.tracker = tracker;\n\n delegate(document, 'form', 'submit', this.handleFormSubmits.bind(this));\n}\n\n\n/**\n * Handles all submits on form elements. A form submit is considered outbound\n * if its action attribute starts with http and does not contain\n * location.hostname.\n * When the beacon transport method is not available, the event's default\n * action is prevented and re-emitted after the hit is sent.\n * @param {Event} event The DOM submit event.\n */\nOutboundFormTracker.prototype.handleFormSubmits = function(event) {\n\n var form = event.delegateTarget;\n var action = form.getAttribute('action');\n var fieldsObj = {transport: 'beacon'};\n\n if (this.opts.shouldTrackOutboundForm(form)) {\n\n if (!navigator.sendBeacon) {\n // Stops the submit and waits until the hit is complete (with timeout)\n // for browsers that don't support beacon.\n event.preventDefault();\n fieldsObj.hitCallback = utilities.withTimeout(function() {\n form.submit();\n });\n }\n\n this.tracker.send('event', 'Outbound Form', 'submit', action, fieldsObj);\n }\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit when a form is\n * submitted. By default, forms with an action attribute that starts with\n * \"http\" and doesn't contain the current hostname are tracked.\n * @param {Element} form The form that was submitted.\n * @return {boolean} Whether or not the form should be tracked.\n */\nOutboundFormTracker.prototype.shouldTrackOutboundForm = function(form) {\n var action = form.getAttribute('action');\n return action &&\n action.indexOf('http') === 0 &&\n action.indexOf(location.hostname) < 0;\n};\n\n\nprovide('outboundFormTracker', OutboundFormTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar delegate = require('delegate');\nvar provide = require('../provide');\n\n\n/**\n * Registers outbound link tracking on a tracker object.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction OutboundLinkTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.OutboundLinkTracker = OutboundLinkTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n shouldTrackOutboundLink: this.shouldTrackOutboundLink\n });\n\n this.tracker = tracker;\n\n delegate(document, 'a', 'click', this.handleLinkClicks.bind(this));\n}\n\n\n/**\n * Handles all clicks on link elements. A link is considered an outbound link\n * its hostname property does not match location.hostname. When the beacon\n * transport method is not available, the links target is set to \"_blank\" to\n * ensure the hit can be sent.\n * @param {Event} event The DOM click event.\n */\nOutboundLinkTracker.prototype.handleLinkClicks = function(event) {\n var link = event.delegateTarget;\n if (this.opts.shouldTrackOutboundLink(link)) {\n // Opens outbound links in a new tab if the browser doesn't support\n // the beacon transport method.\n if (!navigator.sendBeacon) {\n link.target = '_blank';\n }\n this.tracker.send('event', 'Outbound Link', 'click', link.href, {\n transport: 'beacon'\n });\n }\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit when a link is\n * clicked. By default links with a hostname property not equal to the current\n * hostname are tracked.\n * @param {Element} link The link that was clicked on.\n * @return {boolean} Whether or not the link should be tracked.\n */\nOutboundLinkTracker.prototype.shouldTrackOutboundLink = function(link) {\n return link.hostname != location.hostname;\n};\n\n\nprovide('outboundLinkTracker', OutboundLinkTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar delegate = require('delegate');\nvar provide = require('../provide');\n\n\n/**\n * Registers social tracking on tracker object.\n * Supports both declarative social tracking via HTML attributes as well as\n * tracking for social events when using official Twitter or Facebook widgets.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction SocialTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.SocialTracker = SocialTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = defaults(opts, {\n attributePrefix: 'data-'\n });\n\n this.tracker = tracker;\n\n var prefix = this.opts.attributePrefix;\n var selector = '[' + prefix + 'social-network]' +\n '[' + prefix + 'social-action]' +\n '[' + prefix + 'social-target]';\n\n delegate(document, selector, 'click', this.handleSocialClicks.bind(this));\n\n this.detectLibraryLoad('FB', 'facebook-jssdk',\n this.addFacebookEventHandlers.bind(this));\n\n this.detectLibraryLoad('twttr', 'twitter-wjs',\n this.addTwitterEventHandlers.bind(this));\n}\n\n\n/**\n * Handles all clicks on elements with social tracking attributes.\n * @param {Event} event The DOM click event.\n */\nSocialTracker.prototype.handleSocialClicks = function(event) {\n\n var link = event.delegateTarget;\n var prefix = this.opts.attributePrefix;\n\n this.tracker.send('social', {\n socialNetwork: link.getAttribute(prefix + 'social-network'),\n socialAction: link.getAttribute(prefix + 'social-action'),\n socialTarget: link.getAttribute(prefix + 'social-target')\n });\n};\n\n\n/**\n * A utility method that determines when a social library is finished loading.\n * @param {string} namespace The global property name added to window.\n * @param {string} domId The ID of a script element in the DOM.\n * @param {Function} done A callback to be invoked when done.\n */\nSocialTracker.prototype.detectLibraryLoad = function(namespace, domId, done) {\n if (window[namespace]) {\n done();\n }\n else {\n var script = document.getElementById(domId);\n if (script) {\n script.onload = done;\n }\n }\n};\n\n\n/**\n * Adds event handlers for the \"tweet\" and \"follow\" events emitted by the\n * official tweet and follow buttons. Note: this does not capture tweet or\n * follow events emitted by other Twitter widgets (tweet, timeline, etc.).\n */\nSocialTracker.prototype.addTwitterEventHandlers = function() {\n try {\n twttr.ready(function() {\n\n twttr.events.bind('tweet', function(event) {\n // Ignore tweets from widgets that aren't the tweet button.\n if (event.region != 'tweet') return;\n\n var url = event.data.url || event.target.getAttribute('data-url') ||\n location.href;\n\n this.tracker.send('social', 'Twitter', 'tweet', url);\n }.bind(this));\n\n twttr.events.bind('follow', function(event) {\n // Ignore follows from widgets that aren't the follow button.\n if (event.region != 'follow') return;\n\n var screenName = event.data.screen_name ||\n event.target.getAttribute('data-screen-name');\n\n this.tracker.send('social', 'Twitter', 'follow', screenName);\n }.bind(this));\n }.bind(this));\n } catch(err) {}\n};\n\n\n/**\n * Adds event handlers for the \"like\" and \"unlike\" events emitted by the\n * official Facebook like button.\n */\nSocialTracker.prototype.addFacebookEventHandlers = function() {\n try {\n FB.Event.subscribe('edge.create', function(url) {\n this.tracker.send('social', 'Facebook', 'like', url);\n }.bind(this));\n\n FB.Event.subscribe('edge.remove', function(url) {\n this.tracker.send('social', 'Facebook', 'unlike', url);\n }.bind(this));\n } catch(err) {}\n};\n\n\nprovide('socialTracker', SocialTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar defaults = require('../utilities').defaults;\nvar isObject = require('../utilities').isObject;\nvar provide = require('../provide');\n\n\n/**\n * Adds handler for the history API methods\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction UrlChangeTracker(tracker, opts) {\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n gaplugins.UrlChangeTracker = UrlChangeTracker;\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!history.pushState || !window.addEventListener) return;\n\n this.opts = defaults(opts, {\n shouldTrackUrlChange: this.shouldTrackUrlChange\n });\n\n this.tracker = tracker;\n\n // Sets the initial page field.\n // Don't set this on the tracker yet so campaign data can be retreived\n // from the location field.\n this.path = getPath();\n\n // Overrides history.pushState.\n var originalPushState = history.pushState;\n history.pushState = function(state, title, url) {\n // Sets the document title for reference later.\n // TODO(philipwalton): consider using WeakMap for this to not conflict\n // with any user-defined property also called \"title\".\n if (isObject(state) && title) state.title = title;\n\n originalPushState.call(history, state, title, url);\n this.updateTrackerData();\n }.bind(this);\n\n // Overrides history.repaceState.\n var originalReplaceState = history.replaceState;\n history.replaceState = function(state, title, url) {\n // Sets the document title for reference later.\n // TODO(philipwalton): consider using WeakMap for this to not conflict\n // with any user-defined property also called \"title\".\n if (isObject(state) && title) state.title = title;\n\n originalReplaceState.call(history, state, title, url);\n this.updateTrackerData(false);\n }.bind(this);\n\n // Handles URL changes via user interaction.\n window.addEventListener('popstate', this.updateTrackerData.bind(this));\n}\n\n\n/**\n * Updates the page and title fields on the tracker if necessary and\n * optionally sends a pageview.\n */\nUrlChangeTracker.prototype.updateTrackerData = function(shouldSendPageview) {\n\n // Sets the default.\n shouldSendPageview = shouldSendPageview === false ? false : true;\n\n // Calls the update logic asychronously to help ensure user callbacks\n // happen first.\n setTimeout(function() {\n\n var oldPath = this.path;\n var newPath = getPath();\n\n if (oldPath != newPath &&\n this.opts.shouldTrackUrlChange.call(this, newPath, oldPath)) {\n\n this.path = newPath;\n this.tracker.set({\n page: newPath,\n title: isObject(history.state) && history.state.title || document.title\n });\n\n if (shouldSendPageview) this.tracker.send('pageview');\n }\n }.bind(this), 0);\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit with the new page\n * data. This default implementation can be overrided in the config options.\n * @param {string} newPath\n * @param {string} oldPath\n * @return {boolean}\n */\nUrlChangeTracker.prototype.shouldTrackUrlChange = function(newPath, oldPath) {\n return true;\n};\n\n\n/**\n * Returns the path value of the current URL.\n * @return {string}\n */\nfunction getPath() {\n return location.pathname + location.search;\n}\n\n\nprovide('urlChangeTracker', UrlChangeTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar constants = require('./constants');\n\n\n// Adds the dev ID to the list of dev IDs if any plugin is used.\n(window.gaDevIds = window.gaDevIds || []).push(constants.DEV_ID);\n\n\n/**\n * Provides a plugin for use with analytics.js, accounting for the possibility\n * that the global command queue has been renamed.\n * @param {string} pluginName The plugin name identifier.\n * @param {Function} pluginConstructor The plugin constructor function.\n */\nmodule.exports = function providePlugin(pluginName, pluginConstructor) {\n var w = window;\n var g = w.GoogleAnalyticsObject || 'ga';\n\n // Creates the global command queue if it's not defined.\n w[g] = w[g] || function(){(w[g].q=w[g].q||[]).push(arguments)};\n w[g].l = w[g].l || +new Date;\n\n w[g]('provide', pluginName, pluginConstructor);\n};\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar utilities = {\n\n /**\n * Accepts a function and returns a wrapped version of the function that is\n * expected to be called elsewhere in the system. If it's not called\n * elsewhere after the timeout period, it's called regardless. The wrapper\n * function also prevents the callback from being called more than once.\n * @param {Function} callback The function to call.\n * @param {number} wait How many milliseconds to wait before invoking\n * the callback.\n */\n withTimeout: function(callback, wait) {\n var called = false;\n setTimeout(callback, wait || 2000);\n return function() {\n if (!called) {\n called = true;\n callback();\n }\n };\n },\n\n\n /**\n * Accepts an object of overrides and defaults and returns a new object\n * with the values merged. For each key in defaults, if there's a\n * corresponding value in overrides, it gets used.\n * @param {Object} overrides.\n * @param {?Object} defaults.\n */\n defaults: function(overrides, defaults) {\n var result = {};\n\n if (typeof overrides != 'object') {\n overrides = {};\n }\n\n if (typeof defaults != 'object') {\n defaults = {};\n }\n\n for (var key in defaults) {\n if (defaults.hasOwnProperty(key)) {\n result[key] = overrides.hasOwnProperty(key) ?\n overrides[key] : defaults[key];\n }\n }\n return result;\n },\n\n\n isObject: function(obj) {\n return typeof obj == 'object' && obj !== null;\n },\n\n\n isArray: Array.isArray || function(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]';\n },\n\n\n toArray: function(obj) {\n return utilities.isArray(obj) ? obj : [obj];\n }\n};\n\nmodule.exports = utilities;\n","var matches = require('matches-selector')\r\n\r\nmodule.exports = function (element, selector, checkYoSelf) {\r\n var parent = checkYoSelf ? element : element.parentNode\r\n\r\n while (parent && parent !== document) {\r\n if (matches(parent, selector)) return parent;\r\n parent = parent.parentNode\r\n }\r\n}\r\n","module.exports = Date.now || now\n\nfunction now() {\n return new Date().getTime()\n}\n","\n/**\n * Module dependencies.\n */\n\nvar now = require('date-now');\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n\nmodule.exports = function debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = now() - timestamp;\n\n if (last < wait && last > 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function debounced() {\n context = this;\n args = arguments;\n timestamp = now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n};\n","var closest = require('closest');\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector, true);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n","\r\n/**\r\n * Element prototype.\r\n */\r\n\r\nvar proto = Element.prototype;\r\n\r\n/**\r\n * Vendor function.\r\n */\r\n\r\nvar vendor = proto.matchesSelector\r\n || proto.webkitMatchesSelector\r\n || proto.mozMatchesSelector\r\n || proto.msMatchesSelector\r\n || proto.oMatchesSelector;\r\n\r\n/**\r\n * Expose `match()`.\r\n */\r\n\r\nmodule.exports = match;\r\n\r\n/**\r\n * Match `el` to `selector`.\r\n *\r\n * @param {Element} el\r\n * @param {String} selector\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nfunction match(el, selector) {\r\n if (vendor) return vendor.call(el, selector);\r\n var nodes = el.parentNode.querySelectorAll(selector);\r\n for (var i = 0; i < nodes.length; ++i) {\r\n if (nodes[i] == el) return true;\r\n }\r\n return false;\r\n}"],"sourceRoot":"/source/"}