Improve ingress location handling
This commit is contained in:
parent
29c0d6e078
commit
c620342b42
@ -122,7 +122,10 @@ def ingress_request(
|
|||||||
session=session,
|
session=session,
|
||||||
initial=initial,
|
initial=initial,
|
||||||
tracker=tracker,
|
tracker=tracker,
|
||||||
location=location,
|
# At first, location is given by the HTTP referrer. Some browsers
|
||||||
|
# will send the source of the script, however, so we allow JS payloads
|
||||||
|
# to include the location.
|
||||||
|
location=payload.get("location", location),
|
||||||
referrer=payload.get("referrer", ""),
|
referrer=payload.get("referrer", ""),
|
||||||
load_time=payload.get("loadTime"),
|
load_time=payload.get("loadTime"),
|
||||||
)
|
)
|
||||||
|
@ -16,6 +16,7 @@ window.onload = function () {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
idempotency: idempotency,
|
idempotency: idempotency,
|
||||||
referrer: document.referrer,
|
referrer: document.referrer,
|
||||||
|
location: window.location.href,
|
||||||
loadTime:
|
loadTime:
|
||||||
window.performance.timing.domContentLoadedEventEnd -
|
window.performance.timing.domContentLoadedEventEnd -
|
||||||
window.performance.timing.navigationStart,
|
window.performance.timing.navigationStart,
|
||||||
|
Loading…
Reference in New Issue
Block a user