From b0dfd1fb2c99c6252e944c2deef1dedb281433cf Mon Sep 17 00:00:00 2001 From: Lukas Boehler Date: Tue, 27 Oct 2026 06:14:48 +0100 Subject: [PATCH] fix(226492): resend identify when the page language changed Gleap.identify / updateContact skipped the request when the user data was unchanged, without comparing the active language. Apps that switch language without a full reload (Turbo, SPAs updating ) re-identify with the same data, so the contact's language in Gleap never updated and language-targeted outreach used the old language. Co-Authored-By: Claude Opus 5.5 --- src/GleapSession.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/GleapSession.js b/src/GleapSession.js index adf8dc43..97f5f12c 100644 --- a/src/GleapSession.js +++ b/src/GleapSession.js @@ -554,6 +554,13 @@ export default class GleapSession { }; checkIfSessionDataNeedsUpdate = (userData) => { + // Every identify / update sends the active language, so a language switch + // in the app (an change in an SPA, setLanguage) must not be + // skipped as "nothing changed". + if (this.session && this.session.lang && this.session.lang !== GleapTranslationManager.getInstance().getActiveLanguage()) { + return true; + } + if (userData) { var userDataKeys = Object.keys(userData); for (var i = 0; i < userDataKeys.length; i++) {