Skip to content

Commit bf76833

Browse files
committed
add tracking for compass-provider
1 parent 9f7f9d9 commit bf76833

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

packages/compass-web/src/entrypoint.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,37 @@ const CompassWeb = ({
292292
// Making sure that compass-web modals and tooltips are definitely not
293293
// hidden by Cloud UI sidebar and page header
294294
stackedElementsZIndex={10_000}
295+
onNextGuideGue={(cue) => {
296+
onTrackRef.current?.('Guide Cue Dismissed', {
297+
groupId: cue.groupId,
298+
cueId: cue.cueId,
299+
step: cue.step,
300+
});
301+
}}
302+
onNextGuideCueGroup={(cue) => {
303+
if (cue.groupSteps !== cue.step) {
304+
onTrackRef.current?.('Guide Cue Group Dismissed', {
305+
groupId: cue.groupId,
306+
cueId: cue.cueId,
307+
step: cue.step,
308+
});
309+
}
310+
}}
311+
onSignalMount={(id) => {
312+
onTrackRef.current?.('Signal Shown', { id });
313+
}}
314+
onSignalOpen={(id) => {
315+
onTrackRef.current?.('Signal Opened', { id });
316+
}}
317+
onSignalPrimaryActionClick={(id) => {
318+
onTrackRef.current?.('Signal Action Button Clicked', { id });
319+
}}
320+
onSignalLinkClick={(id) => {
321+
onTrackRef.current?.('Signal Link Clicked', { id });
322+
}}
323+
onSignalClose={(id) => {
324+
onTrackRef.current?.('Signal Closed', { id });
325+
}}
295326
{...LINK_PROPS}
296327
>
297328
<PreferencesProvider value={preferencesAccess.current}>

0 commit comments

Comments
 (0)