Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion frontend/express/views/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,36 @@ <h4><a href="#/analytics/events/key/{{encodeURIComponent this.name}}">{{this.nam
if (countlyGlobal.tracking.server_feedback) {
//display in app messages
if (Countly.content && Countly.content.enterContentZone) {
Countly.content.enterContentZone();
Countly.user_details({custom:{content_messages:true}}); // Ensure user is eligible for content messages
Countly.content.enterContentZone(function(params){
if (params.journeyId && (params.widget_id || params.id)) {
try {
var check = params.journeyId + "_";
if (params.widget_id) {
check += "widget_" + params.widget_id;
}
else {
check += "content_" + params.id;
}
var key = "cly_seenJourneyIds_c2VlbkpvdXJuZXlJZHM"; // Base64 for 'seenJourneyIds' to avoid potential key conflicts
var seen = JSON.parse(localStorage.getItem(key) || "[]");

if (seen.includes(check)) {
return false;
}

seen.push(check);
localStorage.setItem(key, JSON.stringify(seen));
return true;
}
catch (e) {
// Handle localStorage errors (disabled, full, security exceptions in private browsing)
// Fail open - allow content to be shown if we can't track it
return false;
}
}
return false;
});
}
}
}
Expand Down
Loading