Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,14 @@ <h3>Chaos - Stranger Missions</h3>
app_slug: app, source: 'apps_catalog'
});
}));
render();
const initialResults = render();
// Track editorial-guide arrivals separately from manual category choices.
// Only the allowlisted category and count are sent; no search terms.
if (goal !== 'all') {
fire('catalog_filter_landing', {
goal, results: initialResults, source: 'editorial_guide'
});
}
})();
</script>
</body>
Expand Down
8 changes: 8 additions & 0 deletions scripts/test_guide_catalog_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def test_catalog_filter_buttons_cover_guides(self):
with self.subTest(goal=goal):
self.assertIn(f'data-goal="{goal}"', catalog)

def test_guide_landing_has_separate_privacy_safe_event(self):
catalog = (ROOT / "apps.html").read_text(encoding="utf-8")
self.assertIn("const initialResults = render();", catalog)
self.assertIn("if (goal !== 'all')", catalog)
self.assertIn("fire('catalog_filter_landing'", catalog)
self.assertIn("goal, results: initialResults, source: 'editorial_guide'", catalog)
self.assertNotIn("query: input.value", catalog)

def test_catalog_cards_and_details_preserved(self):
catalog = (ROOT / "apps.html").read_text(encoding="utf-8")
self.assertEqual(len(re.findall(r'class="app-card"', catalog)), 92)
Expand Down
Loading