@adstage/web-sdk 2.6.2 → 2.6.3
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 +16 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.esm.js +16 -1
- package/dist/index.standalone.js +16 -1
- package/dist/index.umd.js +16 -1
- package/package.json +1 -1
- package/src/example/events/javascript/index-esm.html +2 -2
- package/src/example/events/javascript/index.html +15 -2
- package/src/modules/events/events-module.ts +25 -0
package/dist/index.cjs.js
CHANGED
|
@@ -323,7 +323,7 @@ class DOMUtils {
|
|
|
323
323
|
* AdStage SDK - 버전 정보 유틸리티
|
|
324
324
|
*/
|
|
325
325
|
// package.json에서 버전 정보 가져오기 (빌드 시 자동으로 교체됨)
|
|
326
|
-
const SDK_VERSION$1 = '"2.6.
|
|
326
|
+
const SDK_VERSION$1 = '"2.6.3"';
|
|
327
327
|
/**
|
|
328
328
|
* SDK 버전 정보 반환
|
|
329
329
|
*/
|
|
@@ -4322,6 +4322,21 @@ class EventsModule {
|
|
|
4322
4322
|
getUserId() {
|
|
4323
4323
|
return EventSessionManager.getUserId();
|
|
4324
4324
|
}
|
|
4325
|
+
/**
|
|
4326
|
+
* 사용자 속성 설정
|
|
4327
|
+
*/
|
|
4328
|
+
setUserProperties(properties) {
|
|
4329
|
+
EventUserCollector.setUserProperties(properties);
|
|
4330
|
+
if (this._config?.debug) {
|
|
4331
|
+
console.log('👤 User properties set:', properties);
|
|
4332
|
+
}
|
|
4333
|
+
}
|
|
4334
|
+
/**
|
|
4335
|
+
* 현재 사용자 속성 반환
|
|
4336
|
+
*/
|
|
4337
|
+
getUserProperties() {
|
|
4338
|
+
return EventUserCollector.getCurrentUserProperties();
|
|
4339
|
+
}
|
|
4325
4340
|
/**
|
|
4326
4341
|
* 이벤트 추적
|
|
4327
4342
|
* @param eventName 이벤트 이름
|
package/dist/index.d.ts
CHANGED
|
@@ -428,6 +428,21 @@ declare class EventsModule implements BaseModule {
|
|
|
428
428
|
* 현재 사용자 ID 반환
|
|
429
429
|
*/
|
|
430
430
|
getUserId(): string | undefined;
|
|
431
|
+
/**
|
|
432
|
+
* 사용자 속성 설정
|
|
433
|
+
*/
|
|
434
|
+
setUserProperties(properties: {
|
|
435
|
+
gender?: 'male' | 'female' | 'other' | 'unknown';
|
|
436
|
+
country?: string;
|
|
437
|
+
city?: string;
|
|
438
|
+
age?: string;
|
|
439
|
+
language?: string;
|
|
440
|
+
[key: string]: any;
|
|
441
|
+
}): void;
|
|
442
|
+
/**
|
|
443
|
+
* 현재 사용자 속성 반환
|
|
444
|
+
*/
|
|
445
|
+
getUserProperties(): any;
|
|
431
446
|
/**
|
|
432
447
|
* 이벤트 추적
|
|
433
448
|
* @param eventName 이벤트 이름
|
package/dist/index.esm.js
CHANGED
|
@@ -321,7 +321,7 @@ class DOMUtils {
|
|
|
321
321
|
* AdStage SDK - 버전 정보 유틸리티
|
|
322
322
|
*/
|
|
323
323
|
// package.json에서 버전 정보 가져오기 (빌드 시 자동으로 교체됨)
|
|
324
|
-
const SDK_VERSION$1 = '"2.6.
|
|
324
|
+
const SDK_VERSION$1 = '"2.6.3"';
|
|
325
325
|
/**
|
|
326
326
|
* SDK 버전 정보 반환
|
|
327
327
|
*/
|
|
@@ -4320,6 +4320,21 @@ class EventsModule {
|
|
|
4320
4320
|
getUserId() {
|
|
4321
4321
|
return EventSessionManager.getUserId();
|
|
4322
4322
|
}
|
|
4323
|
+
/**
|
|
4324
|
+
* 사용자 속성 설정
|
|
4325
|
+
*/
|
|
4326
|
+
setUserProperties(properties) {
|
|
4327
|
+
EventUserCollector.setUserProperties(properties);
|
|
4328
|
+
if (this._config?.debug) {
|
|
4329
|
+
console.log('👤 User properties set:', properties);
|
|
4330
|
+
}
|
|
4331
|
+
}
|
|
4332
|
+
/**
|
|
4333
|
+
* 현재 사용자 속성 반환
|
|
4334
|
+
*/
|
|
4335
|
+
getUserProperties() {
|
|
4336
|
+
return EventUserCollector.getCurrentUserProperties();
|
|
4337
|
+
}
|
|
4323
4338
|
/**
|
|
4324
4339
|
* 이벤트 추적
|
|
4325
4340
|
* @param eventName 이벤트 이름
|
package/dist/index.standalone.js
CHANGED
|
@@ -318,7 +318,7 @@ class DOMUtils {
|
|
|
318
318
|
* AdStage SDK - 버전 정보 유틸리티
|
|
319
319
|
*/
|
|
320
320
|
// package.json에서 버전 정보 가져오기 (빌드 시 자동으로 교체됨)
|
|
321
|
-
const SDK_VERSION$1 = '"2.6.
|
|
321
|
+
const SDK_VERSION$1 = '"2.6.3"';
|
|
322
322
|
/**
|
|
323
323
|
* SDK 버전 정보 반환
|
|
324
324
|
*/
|
|
@@ -4317,6 +4317,21 @@ class EventsModule {
|
|
|
4317
4317
|
getUserId() {
|
|
4318
4318
|
return EventSessionManager.getUserId();
|
|
4319
4319
|
}
|
|
4320
|
+
/**
|
|
4321
|
+
* 사용자 속성 설정
|
|
4322
|
+
*/
|
|
4323
|
+
setUserProperties(properties) {
|
|
4324
|
+
EventUserCollector.setUserProperties(properties);
|
|
4325
|
+
if (this._config?.debug) {
|
|
4326
|
+
console.log('👤 User properties set:', properties);
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4329
|
+
/**
|
|
4330
|
+
* 현재 사용자 속성 반환
|
|
4331
|
+
*/
|
|
4332
|
+
getUserProperties() {
|
|
4333
|
+
return EventUserCollector.getCurrentUserProperties();
|
|
4334
|
+
}
|
|
4320
4335
|
/**
|
|
4321
4336
|
* 이벤트 추적
|
|
4322
4337
|
* @param eventName 이벤트 이름
|
package/dist/index.umd.js
CHANGED
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
* AdStage SDK - 버전 정보 유틸리티
|
|
325
325
|
*/
|
|
326
326
|
// package.json에서 버전 정보 가져오기 (빌드 시 자동으로 교체됨)
|
|
327
|
-
const SDK_VERSION$1 = '"2.6.
|
|
327
|
+
const SDK_VERSION$1 = '"2.6.3"';
|
|
328
328
|
/**
|
|
329
329
|
* SDK 버전 정보 반환
|
|
330
330
|
*/
|
|
@@ -4323,6 +4323,21 @@
|
|
|
4323
4323
|
getUserId() {
|
|
4324
4324
|
return EventSessionManager.getUserId();
|
|
4325
4325
|
}
|
|
4326
|
+
/**
|
|
4327
|
+
* 사용자 속성 설정
|
|
4328
|
+
*/
|
|
4329
|
+
setUserProperties(properties) {
|
|
4330
|
+
EventUserCollector.setUserProperties(properties);
|
|
4331
|
+
if (this._config?.debug) {
|
|
4332
|
+
console.log('👤 User properties set:', properties);
|
|
4333
|
+
}
|
|
4334
|
+
}
|
|
4335
|
+
/**
|
|
4336
|
+
* 현재 사용자 속성 반환
|
|
4337
|
+
*/
|
|
4338
|
+
getUserProperties() {
|
|
4339
|
+
return EventUserCollector.getCurrentUserProperties();
|
|
4340
|
+
}
|
|
4326
4341
|
/**
|
|
4327
4342
|
* 이벤트 추적
|
|
4328
4343
|
* @param eventName 이벤트 이름
|
package/package.json
CHANGED
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
<!-- ESM 방식: ES Module import -->
|
|
67
67
|
<script type="module">
|
|
68
68
|
// ESM 방식으로 SDK import
|
|
69
|
-
import { AdStage, track } from 'https://unpkg.com/@adstage/web-sdk@
|
|
69
|
+
import { AdStage, track } from 'https://unpkg.com/@adstage/web-sdk@2.6.2/dist/index.standalone.js';
|
|
70
70
|
|
|
71
71
|
// SDK 초기화
|
|
72
72
|
AdStage.init({
|
|
73
73
|
apiKey: 'c06e2bc7c7244e111d90e530227274898de66ac9f3b5dbeae10e7615c1c616de',
|
|
74
74
|
debug: true,
|
|
75
|
-
baseUrl: 'https://beta-api.adstage.
|
|
75
|
+
baseUrl: 'https://beta-api.adstage.app',
|
|
76
76
|
appVersion: '1.2.3',
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -50,16 +50,29 @@
|
|
|
50
50
|
<div id="result" class="result">이벤트 결과가 여기에 표시됩니다.</div>
|
|
51
51
|
|
|
52
52
|
<!-- AdStage SDK - UMD 방식 (브라우저 호환성을 위한 UMD 포맷) -->
|
|
53
|
-
<script src="https://unpkg.com/@adstage/web-sdk@
|
|
53
|
+
<script src="https://unpkg.com/@adstage/web-sdk@2.6.2/dist/index.umd.js"></script>
|
|
54
54
|
<script>
|
|
55
55
|
// SDK 초기화
|
|
56
56
|
AdStage.init({
|
|
57
57
|
apiKey: 'c06e2bc7c7244e111d90e530227274898de66ac9f3b5dbeae10e7615c1c616de',
|
|
58
58
|
debug: true,
|
|
59
|
-
baseUrl: 'https://beta-api.adstage.
|
|
59
|
+
baseUrl: 'https://beta-api.adstage.app',
|
|
60
60
|
appVersion: '1.2.3',
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
+
// 사용자 ID 설정
|
|
64
|
+
AdStage.events.setUserId('gunny1234');
|
|
65
|
+
|
|
66
|
+
// 사용자 속성 설정
|
|
67
|
+
AdStage.events.setUserProperties({
|
|
68
|
+
age: '28',
|
|
69
|
+
city: 'Seoul',
|
|
70
|
+
gender: 'male',
|
|
71
|
+
country: 'KR',
|
|
72
|
+
occupation: 'developer',
|
|
73
|
+
interests: ['technology', 'gaming', 'travel']
|
|
74
|
+
});
|
|
75
|
+
|
|
63
76
|
function showResult(eventName, params, success = true) {
|
|
64
77
|
const result = document.getElementById('result');
|
|
65
78
|
const timestamp = new Date().toLocaleString();
|
|
@@ -69,6 +69,31 @@ export class EventsModule implements BaseModule {
|
|
|
69
69
|
return EventSessionManager.getUserId();
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* 사용자 속성 설정
|
|
74
|
+
*/
|
|
75
|
+
setUserProperties(properties: {
|
|
76
|
+
gender?: 'male' | 'female' | 'other' | 'unknown';
|
|
77
|
+
country?: string;
|
|
78
|
+
city?: string;
|
|
79
|
+
age?: string;
|
|
80
|
+
language?: string;
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}): void {
|
|
83
|
+
EventUserCollector.setUserProperties(properties);
|
|
84
|
+
|
|
85
|
+
if (this._config?.debug) {
|
|
86
|
+
console.log('👤 User properties set:', properties);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 현재 사용자 속성 반환
|
|
92
|
+
*/
|
|
93
|
+
getUserProperties(): any {
|
|
94
|
+
return EventUserCollector.getCurrentUserProperties();
|
|
95
|
+
}
|
|
96
|
+
|
|
72
97
|
/**
|
|
73
98
|
* 이벤트 추적
|
|
74
99
|
* @param eventName 이벤트 이름
|