decord/source/modules/conversations/ConversationsAnalytics.tsx

222 lines
6.3 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 8558
// Function ID: 8559
2026-07-29 08:29:29 +00:00
// Name: ConversationsAnalytics
// Dependencies: [1372, 676, 698, 2]
2026-07-23 10:11:24 +00:00
2026-08-08 06:10:11 +00:00
// Module 8558 (ConversationsAnalytics)
2026-07-29 08:29:29 +00:00
import ensureGuildLoaded from "ensureGuildLoaded";
2026-07-23 10:11:24 +00:00
import { AnalyticEvents } from "ME";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
const result = require("expandEventProperties").fileFinishedImporting("modules/conversations/ConversationsAnalytics.tsx");
2026-07-20 16:05:17 +00:00
export const ConversationsAnalytics = {
trackEntrypointImpression(channelId) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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-07-29 08:29:29 +00:00
let obj = importDefault(698);
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);
}
};