-
Notifications
You must be signed in to change notification settings - Fork 54
feat(autocapture): set page url enrichment plugin to default on and add/fix tests #1287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 Documentation updates detected! New suggestion: Document page URL enrichment plugin enabled by default in Browser SDK |
1575dc2
to
bff7861
Compare
generateSessionEndEvent(++eventId), | ||
addPageUrlEnrichmentProperties(generateSessionStartEvent(++eventId), url), | ||
generatePageViewEvent(++eventId, 1, url, undefined, { previousPageUrl: '' }), | ||
addPageUrlEnrichmentProperties(generateSessionEndEvent(++eventId), directUrl, url), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are passing and make sense to me, except this (and other similar cases with session_end events have what is expected to be the next page's data.
When do session end events get fired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed this now. session_end
events get tracked when a user visits a website that has Amplitude tracking on it and the "lastEventTime" (which gets updated to the latest time every event) is >30 minutes in the past. When that happens, the client creates a "session_end" event and fires it with "lastEventTime + 1" as it's timestamp.
So the session end events are uploaded at least 30 minutes after the last event in the session takes place. But usually it's way after that.
fcc7160
to
7674bda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple optional comments. Lgtm though.
Summary
Fix tests and release page-url-enrichment-plugin to default on for customers
Checklist