Skip to content

Commit 4081153

Browse files
committed
Track Expert prompt pill clicks
Fire expert-prompt-pill-clicked when a user clicks a suggested prompt pill on the homepage. Captures prompt_title (visible label) and page. Helps identify which pre-built prompts drive engagement.
1 parent 6caa56d commit 4081153

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/js/ai-expert-modal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ document.addEventListener('DOMContentLoaded', function() {
165165
if (e.target.classList.contains('prompt-pill') && e.target.dataset.prompt) {
166166
e.preventDefault();
167167
const promptText = e.target.dataset.prompt;
168+
if (typeof capture === 'function') capture('expert-prompt-pill-clicked', { prompt_title: e.target.textContent.trim(), page: location.pathname });
168169
openModal(promptText);
169170
}
170171
});

0 commit comments

Comments
 (0)