@adstage/web-sdk 2.3.5 → 2.3.6

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/dist/index.cjs.js CHANGED
@@ -1602,12 +1602,7 @@ class AdvertisementEventTracker {
1602
1602
  */
1603
1603
  async trackAdvertisementEvent(adId, slotId, eventType, additionalData) {
1604
1604
  try {
1605
- // VIEWABLE 이벤트의 경우 중복 확인
1606
- if (eventType === AdEventType.VIEWABLE) {
1607
- if (ViewableEventTracker.isDuplicateViewable(adId, slotId, this.debug)) {
1608
- return; // 중복 viewable 이벤트이므로 추적하지 않음
1609
- }
1610
- }
1605
+ // 중복 확인은 AdsModule에서 이미 수행됨 - 여기서는 제거
1611
1606
  // 현재 슬롯 정보 가져오기
1612
1607
  const slot = this.slots.get(slotId);
1613
1608
  // 디바이스 정보 수집
@@ -2871,6 +2866,13 @@ class AdsModule {
2871
2866
  // 기존 내용 제거하고 슬라이더 추가
2872
2867
  container.innerHTML = '';
2873
2868
  container.appendChild(sliderElement);
2869
+ // ✅ 신규: 슬라이더에서도 첫 번째 광고에 대해 ViewabilityTracker 시작
2870
+ if (advertisements.length > 0) {
2871
+ this.startBasicViewabilityTracking(slot, advertisements[0]);
2872
+ if (this._config?.debug) {
2873
+ console.log(`🎯 Viewability tracking started for first ad in slider: ${slot.id}`);
2874
+ }
2875
+ }
2874
2876
  }
2875
2877
  /**
2876
2878
  * 광고 렌더링 (단일 광고용)
package/dist/index.esm.js CHANGED
@@ -1600,12 +1600,7 @@ class AdvertisementEventTracker {
1600
1600
  */
1601
1601
  async trackAdvertisementEvent(adId, slotId, eventType, additionalData) {
1602
1602
  try {
1603
- // VIEWABLE 이벤트의 경우 중복 확인
1604
- if (eventType === AdEventType.VIEWABLE) {
1605
- if (ViewableEventTracker.isDuplicateViewable(adId, slotId, this.debug)) {
1606
- return; // 중복 viewable 이벤트이므로 추적하지 않음
1607
- }
1608
- }
1603
+ // 중복 확인은 AdsModule에서 이미 수행됨 - 여기서는 제거
1609
1604
  // 현재 슬롯 정보 가져오기
1610
1605
  const slot = this.slots.get(slotId);
1611
1606
  // 디바이스 정보 수집
@@ -2869,6 +2864,13 @@ class AdsModule {
2869
2864
  // 기존 내용 제거하고 슬라이더 추가
2870
2865
  container.innerHTML = '';
2871
2866
  container.appendChild(sliderElement);
2867
+ // ✅ 신규: 슬라이더에서도 첫 번째 광고에 대해 ViewabilityTracker 시작
2868
+ if (advertisements.length > 0) {
2869
+ this.startBasicViewabilityTracking(slot, advertisements[0]);
2870
+ if (this._config?.debug) {
2871
+ console.log(`🎯 Viewability tracking started for first ad in slider: ${slot.id}`);
2872
+ }
2873
+ }
2872
2874
  }
2873
2875
  /**
2874
2876
  * 광고 렌더링 (단일 광고용)
@@ -1597,12 +1597,7 @@ class AdvertisementEventTracker {
1597
1597
  */
1598
1598
  async trackAdvertisementEvent(adId, slotId, eventType, additionalData) {
1599
1599
  try {
1600
- // VIEWABLE 이벤트의 경우 중복 확인
1601
- if (eventType === AdEventType.VIEWABLE) {
1602
- if (ViewableEventTracker.isDuplicateViewable(adId, slotId, this.debug)) {
1603
- return; // 중복 viewable 이벤트이므로 추적하지 않음
1604
- }
1605
- }
1600
+ // 중복 확인은 AdsModule에서 이미 수행됨 - 여기서는 제거
1606
1601
  // 현재 슬롯 정보 가져오기
1607
1602
  const slot = this.slots.get(slotId);
1608
1603
  // 디바이스 정보 수집
@@ -2866,6 +2861,13 @@ class AdsModule {
2866
2861
  // 기존 내용 제거하고 슬라이더 추가
2867
2862
  container.innerHTML = '';
2868
2863
  container.appendChild(sliderElement);
2864
+ // ✅ 신규: 슬라이더에서도 첫 번째 광고에 대해 ViewabilityTracker 시작
2865
+ if (advertisements.length > 0) {
2866
+ this.startBasicViewabilityTracking(slot, advertisements[0]);
2867
+ if (this._config?.debug) {
2868
+ console.log(`🎯 Viewability tracking started for first ad in slider: ${slot.id}`);
2869
+ }
2870
+ }
2869
2871
  }
2870
2872
  /**
2871
2873
  * 광고 렌더링 (단일 광고용)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adstage/web-sdk",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "description": "AdStage Web SDK - Production-ready marketing platform SDK with React Provider support for seamless integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -40,12 +40,7 @@ export class AdvertisementEventTracker {
40
40
  }
41
41
  ): Promise<void> {
42
42
  try {
43
- // VIEWABLE 이벤트의 경우 중복 확인
44
- if (eventType === AdEventType.VIEWABLE) {
45
- if (ViewableEventTracker.isDuplicateViewable(adId, slotId, this.debug)) {
46
- return; // 중복 viewable 이벤트이므로 추적하지 않음
47
- }
48
- }
43
+ // 중복 확인은 AdsModule에서 이미 수행됨 - 여기서는 제거
49
44
 
50
45
  // 현재 슬롯 정보 가져오기
51
46
  const slot = this.slots.get(slotId);
@@ -1004,6 +1004,15 @@ export class AdsModule implements BaseModule {
1004
1004
  // 기존 내용 제거하고 슬라이더 추가
1005
1005
  container.innerHTML = '';
1006
1006
  container.appendChild(sliderElement);
1007
+
1008
+ // ✅ 신규: 슬라이더에서도 첫 번째 광고에 대해 ViewabilityTracker 시작
1009
+ if (advertisements.length > 0) {
1010
+ this.startBasicViewabilityTracking(slot, advertisements[0]);
1011
+
1012
+ if (this._config?.debug) {
1013
+ console.log(`🎯 Viewability tracking started for first ad in slider: ${slot.id}`);
1014
+ }
1015
+ }
1007
1016
  }
1008
1017
 
1009
1018
  /**