Skip to content

Commit 9a8de20

Browse files
committed
Merge branch 'NR-443294-navigations' into tmp-user-frustrations
2 parents cf96ab5 + 2af52d8 commit 9a8de20

File tree

1 file changed

+3
-6
lines changed
  • src/features/generic_events/aggregate

1 file changed

+3
-6
lines changed

src/features/generic_events/aggregate/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,16 @@ export class Aggregate extends AggregateBase {
122122
if (this.agentRef.info.beacon) internalTraffic.push(this.agentRef.info.beacon)
123123
if (this.agentRef.init.proxy?.beacon) internalTraffic.push(this.agentRef.init.proxy.beacon)
124124
function evalNetworkRequest (host) {
125-
const isNonAgentTraffic = host && !internalTraffic.includes(host)
126-
if (isNonAgentTraffic && this.userActionAggregator.isEvaluatingDeadClick()) {
127-
this.userActionAggregator.treatAsLiveClick()
128-
}
125+
if (host && !internalTraffic.includes(host)) this.userActionAggregator.treatAsLiveClick()
129126
}
130127

131128
registerHandler('ua', (evt) => {
132129
/** the processor will return the previously aggregated event if it has been completed by processing the current event */
133130
addUserAction(this.userActionAggregator.process(evt, this.agentRef.init.user_actions.elementAttributes))
134131
}, this.featureName, this.ee)
135132
registerHandler('err', () => this.userActionAggregator.markAsErrorClick(), this.featureName, this.ee)
136-
registerHandler('xhr', (params) => evalNetworkRequest.call(this, params.host), this.featureName, this.ee)
137-
registerHandler('navChange', () => this.userActionAggregator.treatAsLiveClick(), this.featureName, this.ee)
133+
registerHandler('xhr', (params) => { if (this.userActionAggregator.isEvaluatingDeadClick()) evalNetworkRequest.call(this, params.host) }, this.featureName, this.ee)
134+
registerHandler('navChange', () => { if (this.userActionAggregator.isEvaluatingDeadClick()) this.userActionAggregator.treatAsLiveClick() }, this.featureName, this.ee)
138135
}
139136

140137
/**

0 commit comments

Comments
 (0)