@adstage/web-sdk 2.3.6 β†’ 2.3.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/dist/index.cjs.js CHANGED
@@ -2840,6 +2840,22 @@ class AdsModule {
2840
2840
  }
2841
2841
  }
2842
2842
  }
2843
+ // πŸ†• μŠ¬λΌμ΄λ”μ—μ„œ VIEWABLE 이벀트 λ°œμƒ μ‹œ ν•΄λ‹Ή κ΄‘κ³ λ‘œ ViewabilityTracker ꡐ체
2844
+ if (eventType === AdEventType.VIEWABLE && advertisements.length > 1) {
2845
+ const currentAd = advertisements.find(ad => ad._id === adId);
2846
+ if (currentAd) {
2847
+ // κΈ°μ‘΄ ViewabilityTracker 정리
2848
+ if (slot.viewabilityTracker) {
2849
+ slot.viewabilityTracker.destroy();
2850
+ slot.viewabilityTracker = null;
2851
+ }
2852
+ // ν˜„μž¬ 광고에 λŒ€ν•΄ μƒˆλ‘œμš΄ ViewabilityTracker μ‹œμž‘
2853
+ this.startBasicViewabilityTracking(slot, currentAd);
2854
+ if (this._config?.debug) {
2855
+ console.log(`πŸ”„ ViewabilityTracker switched to ad ${adId} in slider: ${slot.id}`);
2856
+ }
2857
+ }
2858
+ }
2843
2859
  };
2844
2860
  let sliderElement;
2845
2861
  // μ΅œμ ν™”λœ μŠ¬λΌμ΄λ” μ˜΅μ…˜ μ€€λΉ„
package/dist/index.esm.js CHANGED
@@ -2838,6 +2838,22 @@ class AdsModule {
2838
2838
  }
2839
2839
  }
2840
2840
  }
2841
+ // πŸ†• μŠ¬λΌμ΄λ”μ—μ„œ VIEWABLE 이벀트 λ°œμƒ μ‹œ ν•΄λ‹Ή κ΄‘κ³ λ‘œ ViewabilityTracker ꡐ체
2842
+ if (eventType === AdEventType.VIEWABLE && advertisements.length > 1) {
2843
+ const currentAd = advertisements.find(ad => ad._id === adId);
2844
+ if (currentAd) {
2845
+ // κΈ°μ‘΄ ViewabilityTracker 정리
2846
+ if (slot.viewabilityTracker) {
2847
+ slot.viewabilityTracker.destroy();
2848
+ slot.viewabilityTracker = null;
2849
+ }
2850
+ // ν˜„μž¬ 광고에 λŒ€ν•΄ μƒˆλ‘œμš΄ ViewabilityTracker μ‹œμž‘
2851
+ this.startBasicViewabilityTracking(slot, currentAd);
2852
+ if (this._config?.debug) {
2853
+ console.log(`πŸ”„ ViewabilityTracker switched to ad ${adId} in slider: ${slot.id}`);
2854
+ }
2855
+ }
2856
+ }
2841
2857
  };
2842
2858
  let sliderElement;
2843
2859
  // μ΅œμ ν™”λœ μŠ¬λΌμ΄λ” μ˜΅μ…˜ μ€€λΉ„
@@ -2835,6 +2835,22 @@ class AdsModule {
2835
2835
  }
2836
2836
  }
2837
2837
  }
2838
+ // πŸ†• μŠ¬λΌμ΄λ”μ—μ„œ VIEWABLE 이벀트 λ°œμƒ μ‹œ ν•΄λ‹Ή κ΄‘κ³ λ‘œ ViewabilityTracker ꡐ체
2839
+ if (eventType === AdEventType.VIEWABLE && advertisements.length > 1) {
2840
+ const currentAd = advertisements.find(ad => ad._id === adId);
2841
+ if (currentAd) {
2842
+ // κΈ°μ‘΄ ViewabilityTracker 정리
2843
+ if (slot.viewabilityTracker) {
2844
+ slot.viewabilityTracker.destroy();
2845
+ slot.viewabilityTracker = null;
2846
+ }
2847
+ // ν˜„μž¬ 광고에 λŒ€ν•΄ μƒˆλ‘œμš΄ ViewabilityTracker μ‹œμž‘
2848
+ this.startBasicViewabilityTracking(slot, currentAd);
2849
+ if (this._config?.debug) {
2850
+ console.log(`πŸ”„ ViewabilityTracker switched to ad ${adId} in slider: ${slot.id}`);
2851
+ }
2852
+ }
2853
+ }
2838
2854
  };
2839
2855
  let sliderElement;
2840
2856
  // μ΅œμ ν™”λœ μŠ¬λΌμ΄λ” μ˜΅μ…˜ μ€€λΉ„
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adstage/web-sdk",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
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",
@@ -963,6 +963,25 @@ export class AdsModule implements BaseModule {
963
963
  }
964
964
  }
965
965
  }
966
+
967
+ // πŸ†• μŠ¬λΌμ΄λ”μ—μ„œ VIEWABLE 이벀트 λ°œμƒ μ‹œ ν•΄λ‹Ή κ΄‘κ³ λ‘œ ViewabilityTracker ꡐ체
968
+ if (eventType === AdEventType.VIEWABLE && advertisements.length > 1) {
969
+ const currentAd = advertisements.find(ad => ad._id === adId);
970
+ if (currentAd) {
971
+ // κΈ°μ‘΄ ViewabilityTracker 정리
972
+ if ((slot as any).viewabilityTracker) {
973
+ (slot as any).viewabilityTracker.destroy();
974
+ (slot as any).viewabilityTracker = null;
975
+ }
976
+
977
+ // ν˜„μž¬ 광고에 λŒ€ν•΄ μƒˆλ‘œμš΄ ViewabilityTracker μ‹œμž‘
978
+ this.startBasicViewabilityTracking(slot, currentAd);
979
+
980
+ if (this._config?.debug) {
981
+ console.log(`πŸ”„ ViewabilityTracker switched to ad ${adId} in slider: ${slot.id}`);
982
+ }
983
+ }
984
+ }
966
985
  };
967
986
 
968
987
  let sliderElement: HTMLElement;