@adstage/web-sdk 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -41,13 +41,21 @@ export class AdvertisementEventTracker {
|
|
|
41
41
|
// 현재 슬롯 정보 가져오기
|
|
42
42
|
const slot = this.slots.get(slotId);
|
|
43
43
|
|
|
44
|
+
// 슬롯이 없으면 추적하지 않음 (잘못된 adType으로 저장되는 것 방지)
|
|
45
|
+
if (!slot) {
|
|
46
|
+
if (this.debug) {
|
|
47
|
+
console.warn(`⚠️ Slot not found for slotId: ${slotId}. Skipping event tracking to prevent incorrect adType.`);
|
|
48
|
+
}
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
// 디바이스 정보 수집
|
|
45
53
|
const deviceInfo = DeviceInfoCollector.collectDeviceInfo();
|
|
46
54
|
|
|
47
55
|
// 광고 이벤트 데이터 구성 (단순화됨)
|
|
48
56
|
const eventData = {
|
|
49
|
-
// 필수 필드들 (DTO 검증용)
|
|
50
|
-
adType: slot
|
|
57
|
+
// 필수 필드들 (DTO 검증용) - 이제 slot이 확실히 존재함
|
|
58
|
+
adType: slot.adType,
|
|
51
59
|
platform: deviceInfo.platform,
|
|
52
60
|
deviceId: deviceInfo.deviceId,
|
|
53
61
|
|
|
@@ -59,9 +67,9 @@ export class AdvertisementEventTracker {
|
|
|
59
67
|
pageTitle: DOMUtils.getPageInfo().title,
|
|
60
68
|
referrer: DOMUtils.getPageInfo().referrer,
|
|
61
69
|
slotId,
|
|
62
|
-
slotPosition: DeviceInfoCollector.getSlotPosition(slot
|
|
63
|
-
slotWidth: AdvertisementEventTracker.parseNumericValue(slot
|
|
64
|
-
slotHeight: AdvertisementEventTracker.parseNumericValue(slot
|
|
70
|
+
slotPosition: DeviceInfoCollector.getSlotPosition(slot.containerId),
|
|
71
|
+
slotWidth: AdvertisementEventTracker.parseNumericValue(slot.width),
|
|
72
|
+
slotHeight: AdvertisementEventTracker.parseNumericValue(slot.height),
|
|
65
73
|
sessionId: deviceInfo.sessionId,
|
|
66
74
|
|
|
67
75
|
// 성능 메트릭
|