Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
56 lines
2.5 KiB
TypeScript
56 lines
2.5 KiB
TypeScript
// Module ID: 11638
|
|
// Function ID: 11639
|
|
// Name: IosAttributionMetrics
|
|
// Dependencies: [1074, 7710, 7715, 1241, 2]
|
|
// Exports: trackIosAttributionClick, trackIosAttributionImpression
|
|
|
|
// Module 11638 (IosAttributionMetrics)
|
|
import Constants from "Constants" /* 1074 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
|
|
import MonitoringAgentDefault from "MonitoringAgent" /* 7710 */;
|
|
import MetricEvents from "MetricEvents" /* 7715 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const AnalyticEvents = Constants.AnalyticEvents;
|
|
const result = size.fileFinishedImporting("modules/ads/ios_attribution/IosAttributionMetrics.tsx");
|
|
|
|
export const IosAttributionImpressionResult = { REGISTERED: "registered", NO_FRAMEWORK: "no_framework", NO_METADATA: "no_metadata", NOT_SKAN_ENABLED: "not_skan_enabled", SIGN_FAILED: "sign_failed", NO_TOKEN: "no_token" };
|
|
export const IosAttributionClickResult = { ATTRIBUTED: "attributed", NO_IMPRESSION: "no_impression", NOT_READY: "not_ready" };
|
|
export const trackIosAttributionImpression = function trackIosAttributionImpression(NO_FRAMEWORK, activeIosAttributionFramework, id) {
|
|
let str = activeIosAttributionFramework;
|
|
const obj2 = { name: MetricEvents.MetricEvents.IOS_ATTRIBUTION_IMPRESSION, tags: null };
|
|
const items = ["result:" + NO_FRAMEWORK, ];
|
|
let str2 = activeIosAttributionFramework;
|
|
if (activeIosAttributionFramework == null) {
|
|
str2 = "none";
|
|
}
|
|
items[1] = "framework:" + str2;
|
|
obj2.tags = items;
|
|
MonitoringAgentDefault.increment(obj2);
|
|
const obj3 = { impression_id: id, attribution_framework: null, attribution_result: null };
|
|
if (str == null) {
|
|
str = "none";
|
|
}
|
|
obj3.attribution_framework = str;
|
|
obj3.attribution_result = NO_FRAMEWORK;
|
|
AnalyticsUtilsDefault.track(AnalyticEvents.IOS_ATTRIBUTION_VIEW_RESOLVED, obj3);
|
|
};
|
|
export const trackIosAttributionClick = function trackIosAttributionClick(ATTRIBUTED, framework, impression_id) {
|
|
let str = framework;
|
|
const obj2 = { name: MetricEvents.MetricEvents.IOS_ATTRIBUTION_CLICK, tags: null };
|
|
const items = ["result:" + ATTRIBUTED, ];
|
|
let str2 = framework;
|
|
if (framework == null) {
|
|
str2 = "none";
|
|
}
|
|
items[1] = "framework:" + str2;
|
|
obj2.tags = items;
|
|
MonitoringAgentDefault.increment(obj2);
|
|
const obj3 = { impression_id, attribution_framework: null, attribution_result: null };
|
|
if (str == null) {
|
|
str = "none";
|
|
}
|
|
obj3.attribution_framework = str;
|
|
obj3.attribution_result = ATTRIBUTED;
|
|
AnalyticsUtilsDefault.track(AnalyticEvents.IOS_ATTRIBUTION_CLICK_RESOLVED, obj3);
|
|
};
|