costway-tracking-v2 2.0.11 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -394,9 +394,9 @@ function trackResourceLoadTimes() {
394
394
  function setupRouterListener(router) {
395
395
  router.beforeEach((to, from, next) => {
396
396
  if (from.name) {
397
- console.log("路由对象 离开页面了 ===start")
397
+ // console.log("路由对象 离开页面了 ===start")
398
398
  trackPageLeave("setupRouterListener");
399
- console.log("路由对象 离开页面了 ====end")
399
+ // console.log("路由对象 离开页面了 ====end")
400
400
  }
401
401
  hasTrackedPageLeave = ""; // 重置标志
402
402
  next();
@@ -433,7 +433,7 @@ module.exports = {
433
433
  document.addEventListener('visibilitychange', function () {
434
434
  if (lastVisibilityState) {
435
435
  if (document.visibilityState === 'hidden' || document.hidden) {
436
- console.log('hidden');
436
+ // console.log('hidden');
437
437
  // 页面从可见变为不可见,记录时间
438
438
  pageHiddenTime = new Date().getTime();
439
439
  const visibleDuration = new Date().getTime() - pageVisibleTime;
@@ -457,7 +457,7 @@ module.exports = {
457
457
  lastVisibilityState = document.visibilityState;
458
458
  });
459
459
  window.addEventListener('pagehide', function () {
460
- console.log('pagehide');
460
+ // console.log('pagehide');
461
461
  if (hasTrackedPageLeave == "pagehide") {
462
462
  hasTrackedPageLeave = "pagehide";
463
463
  trackPageLeave('pagehide');
@@ -478,7 +478,7 @@ module.exports = {
478
478
  }
479
479
  },
480
480
  trackCustomEvent: function (eventName, eventData) {
481
- console.log(eventName)
481
+ // console.log(eventName)
482
482
  const data = {
483
483
  userId: getuserId(),
484
484
  timestamp: new Date().getTime(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costway-tracking-v2",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "统计代码,新增vue3和vue2分别管理版本-增加多国家",
5
5
  "main": "index.cjs",
6
6
  "type": "module",
package/tracking.js CHANGED
@@ -430,7 +430,7 @@
430
430
  document.addEventListener('visibilitychange', function () {
431
431
  if (lastVisibilityState) {
432
432
  if (document.visibilityState === 'hidden' || document.hidden) {
433
- console.log('hidden');
433
+ // console.log('hidden');
434
434
  // 页面从可见变为不可见,记录时间
435
435
  pageHiddenTime = new Date().getTime();
436
436
  const visibleDuration = new Date().getTime() - pageVisibleTime;
@@ -454,7 +454,7 @@
454
454
  lastVisibilityState = document.visibilityState;
455
455
  });
456
456
  window.addEventListener('pagehide', function () {
457
- console.log('pagehide');
457
+ // console.log('pagehide');
458
458
  if (hasTrackedPageLeave == "pagehide") {
459
459
  hasTrackedPageLeave = "pagehide";
460
460
  trackPageLeave('pagehide');
package/trackvue3.js CHANGED
@@ -425,7 +425,7 @@ function setupRouterListener(router) {
425
425
  hasTrackedPageLeave = false;
426
426
  const fromFullURL = `${window.location.protocol}//${window.location.hostname}${from.fullPath}`;
427
427
  const toFullURL = `${window.location.protocol}//${window.location.hostname}${to.fullPath}`;
428
- console.log('从', fromFullURL, '跳转到', toFullURL);
428
+ // console.log('从', fromFullURL, '跳转到', toFullURL);
429
429
  lastRoute = currentRoute;
430
430
  currentRoute = toFullURL;
431
431
  simulatedReferrer = fromFullURL; // 更新模拟的referrer为当前页面的完整URL