amplitude / amplitude/Amplitude-TypeScript

`Previous Page Type` incorrectly stated as `external` when `Previous Page Location` is a subdomain in the same domain

オープン
#1,400 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
180
フォーク
68
平均マージ
3日 1時間
マージ済み PR(30日)
29

説明

## Expected Behavior

`Previous Page Type` event property should be `internal` when the previous page location is still in the same domain.

Example:
```
[Amplitude] Page URL = https://my.bigcartel.biz/login
[Amplitude] Previous Page Location = https://app.bigcartel.biz/
[Amplitude] Previous Page Type = internal
```

## Current Behavior

`Previous Page Type` event property is incorrectly stating `external` when the previous page is still in our domain.

Example just now:
```
[Amplitude] Page URL = https://my.bigcartel.biz/login
[Amplitude] Previous Page Location = https://app.bigcartel.biz/
[Amplitude] Previous Page Type = external
```

## Comments

Should this logic depend on the setting for `excludeReferrers`? It's tough to not have control over what is considered "internal" vs "external" making this new `Previous Page Type` property not helpful.

Perhaps domains matching the `excludeReferrers` should mean its `internal` otherwise `external` if a referrer defined, then fallback to `direct` when no referrer?

## Environment

- JS SDK Version:
- `@amplitude/analytics-browser@2.29.0`
- `@amplitude/plugin-web-attribution-browser@2.1.92`
- `@amplitude/analytics-client-common@2.4.11` (contains the bug)
- Installation Method: NPM
- Browser and Version: All browsers
- Next.js Version: 15.1.6

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。