Skip to content

Commit

Permalink
fix: 修复referrer
Browse files Browse the repository at this point in the history
  • Loading branch information
codepzj committed Dec 29, 2024
1 parent 602738b commit 112d8bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/js/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
type: "pageview",
visitorId: visitorId,
url: cleanUrl(href),
referrer: referrer.startsWith(origin) ? "直接访问" : referrer,
referrer: referrer.startsWith(origin) ? "" : referrer,
language: language,
screen: `${width}x${height}`,
userAgent: userAgent,
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
type: "pageview",
visitorId: visitorId,
url: cleanUrl(href),
referrer: referrer.startsWith(origin) ? "直接访问" : referrer,
referrer: referrer.startsWith(origin) ? "" : referrer,
language: language,
screen: `${width}x${height}`,
userAgent: userAgent,
Expand Down

0 comments on commit 112d8bc

Please sign in to comment.