decord/source/modules/conversations/ConversationsAnalytics.tsx

223 lines
6.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8713
// Function ID: 8714
2026-07-29 08:29:29 +00:00
// Name: ConversationsAnalytics
2026-08-11 06:20:06 +00:00
// Dependencies: [1391, 676, 698, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 8713 (ConversationsAnalytics)
2026-08-24 06:08:38 +00:00
import expandEventPropertiesDefault from "expandEventProperties" /* 698 */;
import closure_2 from "ensureGuildLoaded" /* 1391 */;
import { AnalyticEvents } from "ME" /* 676 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/conversations/ConversationsAnalytics.tsx");
2026-07-20 16:05:17 +00:00
export const ConversationsAnalytics = {
trackEntrypointImpression(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
obj.conversation_count = channelId.conversationCount;
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_ENTRYPOINT_IMPRESSION, obj);
},
trackTopicsUnitImpression(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationIds: obj3.conversation_ids, isFocusMode: obj3.is_focus_mode } = channelId);
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_IMPRESSION, obj);
},
trackPreviewImpression(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_PREVIEW_IMPRESSION, obj);
},
trackTopicsUnitClicked(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode } = channelId);
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_TOPICS_UNIT_CLICKED, obj);
},
trackFocusModeImpression(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
obj.conversation_id = channelId.conversationId;
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_IMPRESSION, obj);
},
trackFocusModeDismissed(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, dismissReason: obj3.dismiss_reason } = channelId);
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_FOCUS_MODE_DISMISSED, obj);
},
trackThumbsClicked(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isThumbsUp: obj3.is_thumbs_up, isFocusMode: obj3.is_focus_mode } = channelId);
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_THUMBS_CLICKED, obj);
},
trackThumbsDownReasonSelected(channelId) {
2026-08-24 06:08:38 +00:00
let obj = expandEventPropertiesDefault;
2026-07-29 08:29:29 +00:00
channelId = channelId.channelId;
const channel = store.getChannel(channelId);
obj = { channel_id: channelId, channel_type: null, guild_id: null };
let type;
if (channel != null) {
type = channel.type;
}
if (type == null) {
type = null;
}
obj[1] = type;
let guild_id;
if (channel != null) {
guild_id = channel.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
obj[2] = guild_id;
const merged = Object.assign(obj);
({ conversationId: obj3.conversation_id, isFocusMode: obj3.is_focus_mode, reasons: obj3.reasons, otherText: obj3.other_text } = channelId);
2026-07-20 16:05:17 +00:00
obj.track(AnalyticEvents.TOPICAL_NAV_THUMBS_DOWN_REASON_SELECTED, obj);
}
};