Skip to content

Commit

Permalink
Log whether a visit that has started is a page refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Feb 23, 2024
1 parent 2fc9f3c commit ae6e28b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion turbo/src/main/assets/js/turbo_bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
}

visitStarted(visit) {
TurboSession.visitStarted(visit.identifier, visit.hasCachedSnapshot(), visit.location.toString())
TurboSession.visitStarted(visit.identifier, visit.hasCachedSnapshot(), visit.isPageRefresh || false, visit.location.toString())
this.currentVisit = visit
this.issueRequestForVisitWithIdentifier(visit.identifier)
this.changeHistoryForVisitWithIdentifier(visit.identifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,14 @@ class TurboSession internal constructor(
* @param location The location being visited.
*/
@JavascriptInterface
fun visitStarted(visitIdentifier: String, visitHasCachedSnapshot: Boolean, location: String) {
fun visitStarted(visitIdentifier: String, visitHasCachedSnapshot: Boolean,
visitIsPageRefresh: Boolean, location: String
) {
logEvent(
"visitStarted", "location" to location,
"visitIdentifier" to visitIdentifier,
"visitHasCachedSnapshot" to visitHasCachedSnapshot
"visitHasCachedSnapshot" to visitHasCachedSnapshot,
"visitIsPageRefresh" to visitIsPageRefresh
)

currentVisit?.identifier = visitIdentifier
Expand Down

0 comments on commit ae6e28b

Please sign in to comment.