Skip to content

Commit 1ea7a22

Browse files
committed
Don't send history replace events for amplitude
1 parent f07b169 commit 1ea7a22

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/app/src/app/pages/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ const RoutesComponent: React.FC = () => {
8888
<Container>
8989
<Route
9090
path="/"
91-
render={({ location }) => {
92-
if (process.env.NODE_ENV === 'production') {
91+
render={({ location, history }) => {
92+
if (
93+
process.env.NODE_ENV === 'production' &&
94+
history.action !== 'REPLACE'
95+
) {
9396
routeDebugger(
9497
`Sending '${location.pathname + location.search}' to analytics.`
9598
);

0 commit comments

Comments
 (0)