UNPKG

gatsby-plugin-baidu-analytics

Version:
11 lines (9 loc) 395 B
"use strict"; exports.onRouteUpdate = function (_ref) { var _ref$location = _ref.location, location = _ref$location === void 0 ? {} : _ref$location; // Don't track while developing. if (process.env.NODE_ENV === "production" && typeof _hmt === "function") { window._hmt.push(["_trackPageview", "".concat(location.pathname).concat(location.search).concat(location.hash)]); } };