decord/alpha/source/modules/auth/experiment/trackAgeGateSubmitted.tsx

28 lines
1 KiB
TypeScript
Raw Normal View History

2026-10-06 11:16:32 +00:00
// Module ID: 15919
// Function ID: 15920
2026-07-20 16:05:17 +00:00
// Name: trackAgeGateSubmitted
2026-10-06 11:16:32 +00:00
// Dependencies: [1085, 1252, 4467, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-06 11:16:32 +00:00
// Module 15919 (trackAgeGateSubmitted)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1252 */;
2026-10-06 11:16:32 +00:00
import _modDef4467 from "module_4467" /* 4467 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const AnalyticEvents = Constants.AnalyticEvents;
const result = size.fileFinishedImporting("modules/auth/experiment/trackAgeGateSubmitted.tsx");
2026-07-20 16:05:17 +00:00
export default function trackAgeGateSubmitted(format, section) {
2026-10-03 08:58:59 +00:00
const track = AnalyticsUtilsDefault.track;
const AGE_GATE_SUBMITTED = AnalyticEvents.AGE_GATE_SUBMITTED;
AnalyticsUtilsDefault;
2026-07-20 16:05:17 +00:00
let formatResult = null;
2026-10-06 11:16:32 +00:00
const obj = _modDef4467();
2026-10-03 08:58:59 +00:00
if (obj.diff(format, "years") < 18) {
2026-07-20 16:05:17 +00:00
formatResult = format.format("YYYY-MM-DD");
}
2026-10-03 08:58:59 +00:00
const obj2 = { dob: formatResult, dob_day: format.date(), dob_month: format.month() + 1, dob_year: format.year(), source: { section } };
track(AGE_GATE_SUBMITTED, obj2);
2026-07-20 16:05:17 +00:00
};