# 커스텀 이벤트 예시

아래에서 다양한 앱 카테고리에 권장되는 여러 인앱 이벤트를 찾을 수 있습니다.

이러한 이벤트나 다른 이벤트를 구현하려면:

*   Pushwoosh 제어판에서 [이벤트 생성](/ko/product/audience-data-and-segmentation/events/#1-create-events-in-pushwoosh-control-panel)하고 필요한 경우 속성을 추가합니다.
*   모바일 프로젝트에 [postEvent](/ko/developer/api-reference/user-centric-api#postevent) 메서드를 통합하여 제어판에 있는 것과 정확히 동일한 이벤트 이름과 속성을 제공합니다.

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Event name", { // event name exactly as in Control Panel
    "attribute 1": "string value", // attribute name and type exactly as in Control Panel
    "attribute 2": "string value" // attribute name and type exactly as in Control Panel
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "attribute 1" : "string value", // attribute name and type exactly as in Control Panel
   "attribute 2" : "string value" // attribute name and type exactly as in Control Panel
]
PWInAppManager.shared().postEvent("Event name", withAttributes: attributes) // event name exactly as in Control Panel
```
</TabItem>
<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"attribute 1" : @"string value", // attribute name and type exactly as in Control Panel
   @"attribute 2" : @"string value" // attribute name and type exactly as in Control Panel
};
[[PushNotificationManager pushManager] postEvent:@“eventName” withAttributes:attributes]; // event name exactly as in Control Panel
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("attribute 1", "string value") // attribute name and type exactly as in Control Panel
    .putString("attribute 2", "string value") // attribute name and type exactly as in Control Panel
    .build()

PushwooshInApp.getInstance().postEvent("Event name", attributes); // event name exactly as in Control Panel
```
</TabItem>
</Tabs>

<Aside type="note">
아래 샘플은 해당 이벤트가 있고 제어판에서 속성이 생성된 경우 앱에 간단히 붙여넣을 수 있습니다. 통합되면 이벤트 데이터가 수집되어 Audience -> Events -> Event statistics 에서 사용할 수 있게 되며, 캠페인 계획에 이벤트를 사용할 수 있습니다.
</Aside>

## 모바일 앱

### 로그아웃

사용자가 앱에서 계정을 로그아웃할 때 이 이벤트를 트리거합니다.

권장 속성:

*   user\_id: String
*   date: Date

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Log out", {
    "user_id": "string value",
    "date": "date value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "user_id" : "string value",
   "date" : "date value"
]
PWInAppManager.shared().postEvent("Log out", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"user_id" : @"string value",
   @"date" : @"date value"
};
[[PushNotificationManager pushManager] postEvent:@"Log out" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("user_id", "string value")
    .putString("date", "date value")
    .build()

PushwooshInApp.getInstance().postEvent("Log out", attributes);
```
</TabItem>
</Tabs>

### 결제 수단 추가됨

사용자가 앱의 계정에 결제 수단을 추가할 때(예: 카드 정보를 제공하거나 계정을 결제 시스템에 연결) 이 이벤트를 발생시킵니다.

권장 속성:

*   payment\_method: String,
*   user\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Payment method added", {
    "user_id": "string value",
    "payment_method": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "user_id" : "string value",
   "payment_method" : "string value"
]
PWInAppManager.shared().postEvent("Payment method added", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"payment_method" : @"string value",
   @"user_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Payment method added" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("payment_method", "string value")
    .putString("user_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Payment method added", attributes);
```
</TabItem>
</Tabs>

### 결제 수단 변경됨

사용자가 앱에서 결제 수단을 업데이트할 때 이 이벤트를 보냅니다.

권장 속성:

*   user\_id: String,
*   payment\_method: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Payment method changed", {
    "user_id": "string value",
    "payment_method": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "user_id" : "string value",
   "payment_method" : "string value"
]
PWInAppManager.shared().postEvent("Payment method changed", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"user_id" : @"string value",
   @"payment_method" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Payment method changed" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("user_id", "string value")
    .putString("payment_method", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Payment method changed", attributes);
```
</TabItem>
</Tabs>

### 버튼 클릭됨

이 이벤트를 사용하여 앱 내 버튼 클릭을 추적하여 분석을 개선하고, 다양한 커뮤니케이션 전략을 테스트하며, 고객 행동을 기반으로 메시지의 관련성을 높입니다.

권장 이벤트 속성:

*   user\_id: String
*   button\_link: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Button clicked", {
    "user_id": "string value",
    "button_link": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "user_id" : "string value",
   "button_link" : "string value"
]
PWInAppManager.shared().postEvent("Button clicked", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"user_id" : @"string value",
   @"button_link" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Button clicked" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("user_id", "string value")
    .putString("button_link", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Button clicked", attributes);

```
</TabItem>
</Tabs>

### 애플리케이션 업데이트됨

사용자가 앱의 업데이트된 버전을 설치할 때마다 이 이벤트를 트리거합니다.

권장 속성:

*   previous\_app\_version: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Application updated", {
    "previous_app_version": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "previous_app_version" : "string value"
]
PWInAppManager.shared().postEvent("Application updated", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"previous_app_version" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Application updated" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("previous_app_version", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Application updated", attributes);
```
</TabItem>
</Tabs>

### OS 업데이트됨

사용자가 기기의 OS 버전을 업데이트하여 앱이 완전히 호환되는지 확인할 때 이 이벤트를 발생시킵니다.

권장 속성:

*   previous\_OS\_version: String
*   new\_OS\_version: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("OS updated", {
    "previous_OS_version": "string value",
    "new_OS_version": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "previous_OS_version" : "string value",
   "new_OS_version": "string value"
]
PWInAppManager.shared().postEvent("OS updated", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"previous_OS_version" : @"string value",
   @"new_OS_version" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"OS updated" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("previous_OS_version", "string value")
    .putString("new_OS_version", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("OS updated", attributes);
```
</TabItem>
</Tabs>

## 전자상거래
### 장바구니에 제품 추가됨

사용자가 장바구니에 제품을 추가하면 이 이벤트를 발생시켜 장바구니 포기 캠페인을 구축하고, 사용자 태그를 설정하거나 프로모션의 효율성을 분석합니다.

권장 속성:

*   product\_id: String
*   price: Integer
*   source: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Product added to cart", {
    "product_id": "string value",
    "price": 1,
    "source": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "price" : 1,
   "product_id" : "string value",
   "source" : "string value"
]
PWInAppManager.shared().postEvent("Product added to cart", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"price" : @(1),
   @"product_id" : @"string value",
   @"source" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Product added to cart" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putInt("price", 1)
    .putString("product_id", "string value")
    .putString("source", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Product added to cart", attributes);
```
</TabItem>
</Tabs>

### 할인 구매

사용자가 할인 쿠폰을 사용하여 제품을 구매하면 이 이벤트를 트리거합니다.

권장 속성:

*   product\_id: String
*   coupon\_id: String
*   price: Integer
*   discount: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Discounted purchase", {
    "product_id": "string value",
    "coupon_id": "string value",
    "price": 1,
    "discount": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "product_id" : "string value",
   "coupon_id" : "string value",
   "price" : 1,
   "discount" : "string value"
]
PWInAppManager.shared().postEvent("Discounted purchase", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"product_id" : @"string value",
   @"coupon_id" : @"string value",
   @"price" : @(1),
   @"discount" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Discounted purchase" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("product_id", "string value")
    .putString("coupon_id", "string value")
    .putInt("price", 1)
    .putString("discount", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Discounted purchase", attributes);
```
</TabItem>
</Tabs>

### 제품 페이지 이탈

사용자가 전환 행동 없이 제품 페이지를 떠날 때 이 이벤트를 발생시킵니다.

권장 속성:

*   product\_id: String
*   price: Integer
*   source: String
*   product\_page\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Product Page abandoned", {
    "product_id": "string value",
    "price": 1,
    "source": "string value",
    "product_page_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "product_id" : "string value",
   "price" : 1,
   "source" : "string value",
   "product_page_id" : "string value"
]
PWInAppManager.shared().postEvent("Product Page abandoned", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"product_id" : @"string value",
   @"price" : @(1),
   @"source" : @"string value",
   @"product_page_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Product Page abandoned" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("product_id", "string value")
    .putInt("price", 1)
    .putString("source", "string value")
    .putString("product_page_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Product Page abandoned", attributes);
```
</TabItem>
</Tabs>

### 위시리스트에 제품 추가됨

사용자가 위시리스트에 저장한 제품에 대한 정보를 파악하고 개인화된 제안 및 프로모션 캠페인을 만듭니다.

권장 속성:

*   product\_id: String
*   wishlist\_id: String
*   product\_price: Integer
*   source: String
*   user\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Product added to wishlist", {
    "product_id": "string value",
    "currency": "string value",
    "price": 1,
    "source": "string value",
    "user_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "product_id" : "string value",
   "wishlist_id" : "string value",
   "product_price" : 1,
   "source" : "string value",
   "user_id" : "string value"
]
PWInAppManager.shared().postEvent("Product added to wishlist", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"product_id" : @"string value",
   @"wishlist_id" : @"string value",
   @"product_price" : @(1),
   @"source" : @"string value",
   @"user_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Product added to wishlist" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("product_id", "string value")
    .putString("wishlist_id", "string value")
    .putInt("product_price", 1)
    .putString("source", "string value")
    .putString("user_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Product added to wishlist", attributes);
```
</TabItem>
</Tabs>

### 위시리스트에서 제품 제거됨

사용자가 위시리스트에서 제품을 삭제할 때 이 이벤트를 발생시킵니다.

권장 속성:

*   user\_id: String
*   wishlist\_id: String
*   product\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Product removed from wishlist", {
    "wishlist_id": "string value",
    "user_id": "string value",
    "product_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "wishlist_id" : "string value",
   "user_id" : "string value",
   "product_id" : "string value"
]
PWInAppManager.shared().postEvent("Product removed from wishlist", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"wishlist_id" : @"string value",
   @"user_id" : @"string value",
   @"product_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Product removed from wishlist" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("wishlist_id", "string value")
    .putString("user_id", "string value")
    .putString("product_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Product removed from wishlist", attributes);
```
</TabItem>
</Tabs>

### 제품 카테고리

사용자가 특정 카테고리의 제품을 구매할 때 이 이벤트를 보냅니다.

권장 속성:

*   product\_id: String
*   product\_category: String
*   currency: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Product category", {
    "product_id": "string value",
    "product_category": "string value",
    "currency": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "product_id" : "string value",
   "product_category" : "string value",
   "currency" : "string value"
]
PWInAppManager.shared().postEvent("Product category", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"product_id" : @"string value",
   @"product_category" : @"string value",
   @"currency" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Product category" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("product_id", "string value")
    .putString("product_category", "string value")
    .putString("currency", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Product category", attributes);
```
</TabItem>
</Tabs>

### 첫 구매

사용자가 첫 구매를 하면 이 이벤트를 트리거합니다.

권장 속성:

*   product\_id: String,
*   category: String
*   date: Date

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("First purchase", {
    "product_id": "string value",
    "category": "string value",
    "date": "date value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "product_id" : "string value",
   "category" : "string value",
   "date" : "date value"
]
PWInAppManager.shared().postEvent("First purchase", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"product_id" : @"string value",
   @"category" : @"string value",
   @"date" : @"date value"
};
[[PushNotificationManager pushManager] postEvent:@"First purchase" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("product_id", "string value")
    .putString("category", "string value")
    .putBoolean("date", "date value")
    .build()

PushwooshInApp.getInstance().postEvent("First purchase", attributes);
```
</TabItem>
</Tabs>

## 게임 앱

### 새로운 레벨

사용자가 새로운 게임 레벨에 도달하면 '새로운 레벨' 이벤트를 트리거합니다.

권장 속성:

*   level\_id: String
*   user\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("New level", {
    "level_id": "string value",
    "user_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "level_id" : "string value",
   "user_id" : "string value"
]
PWInAppManager.shared().postEvent("New level", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"level_id" : @"string value",
   @"user_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"New level" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("level_id", "string value")
    .putString("user_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("New level", attributes);
```
</TabItem>
</Tabs>

### 레벨 완료

사용자가 특정 게임 레벨을 완료하면 이 이벤트를 보냅니다.

권장 속성:

*   level\_id: String
*   user\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Level completed", {
    "level_id": "string value",
    "user_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "level_id" : "string value",
   "user_id" : "string value"
]
PWInAppManager.shared().postEvent("Level completed", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"level_id" : @"string value",
   @"user_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Level completed" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("level_id", "string value")
    .putString("user_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Level completed", attributes);
```
</TabItem>
</Tabs>

### 가상 화폐 획득

사용자의 가상 화폐 잔액이 충전될 때 이 이벤트를 발생시킵니다.

권장 속성:

*   currency\_name: String
*   quantity: Integer
*   user\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Virtual currency earned", {
    "currency_name": "string value",
    "quantity": 1,
    "user_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "currency_name" : "string value",
   "quantity" : 1,
   "user_id" : "string value"
]
PWInAppManager.shared().postEvent("Virtual currency earned", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"currency_name" : @"string value",
   @"quantity" : @(1),
   @"user_id" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Virtual currency earned" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("currency_name", "string value")
    .putInt("quantity", 1)
    .putString("user_id", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Virtual currency earned", attributes);
```
</TabItem>
</Tabs>

### 튜토리얼 완료

사용자가 게임 내 튜토리얼을 완료하면 이 이벤트를 트리거합니다.

권장 속성:

*   tutorial\_name: String
*   completion: Boolean

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Tutorial completed", {
    "tutorial_name": "string value",
    "completion": true
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "tutorial_name" : "string value",
   "completion" : true
]
PWInAppManager.shared().postEvent("Tutorial completed", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"tutorial_name" : @"string value",
   @"completion" : @YES
};
[[PushNotificationManager pushManager] postEvent:@"Tutorial completed" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("tutorial_name", "string value")
    .putBoolean("completion", true)
    .build()

PushwooshInApp.getInstance().postEvent("Tutorial completed", attributes);
```
</TabItem>
</Tabs>

### 업적 달성

사용자가 특정 업적을 달성할 때 발생하는 이벤트로 사용자 참여를 모니터링합니다.

권장 속성:

*   achievement\_name: String
*   level: Integer
*   user\_id: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Achievement unlocked", {
    "achievement_name": "string value",
    "level": 5,
    "user_id": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "achievement_name" : "string value",
   "level" : 5,
   "user_id": "string value"
]
PWInAppManager.shared().postEvent("Achievement unlocked", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"achievement_name" : @"string value",
   @"level" : @1,
   @"user_id" : "string value"
};
[[PushNotificationManager pushManager] postEvent:@"Achievement unlocked" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("achievemnt_name", "string value")
    .putString("level", 1)
    .putString("user_id", "string value)
    .build()

PushwooshInApp.getInstance().postEvent("Achievement unlocked", attributes);
```
</TabItem>
</Tabs>

## 구독 관리


### 유료 구독 구매

사용자가 유료 구독 요금제를 구매했을 때 이 이벤트를 보냅니다.

권장 속성:

*   subscription\_plan\_name: String
*   price: Integer
*   currency:String
*   expiry\_date:Date

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Paid subscription purchase", {
    "subscription_plan_name": "string value",
    "price": 1,
    "currency": "string value",
    "expiry_date": "new Date()"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "subscription_plan_name" : "string value",
   "price" : 1,
   "currency" : "string value",
   "expiry_date" : NSDate()
]
PWInAppManager.shared().postEvent("Paid subscription purchase", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"subscription_plan_name" : @"string value",
   @"price" : @(1),
   @"currency" : @"string value",
   @"expiry_date" : [NSDate date]
};
[[PushNotificationManager pushManager] postEvent:@"Paid subscription purchase" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("subscription_plan_name", "string value")
    .putInt("price", 1)
    .putString("currency", "string value")
    .putDate("expiry_date", new Date())
    .build()

PushwooshInApp.getInstance().postEvent("Paid subscription purchase", attributes);
```
</TabItem>
</Tabs>

### 구독 갱신

사용자가 구독 요금제를 갱신하면 이 이벤트를 트리거합니다.

권장 속성:

*   subscription\_plan\_name: String
*   price: Integer
*   currency: String
*   renewal\_count: Integer

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Subscription renewal", {
    "subscription_plan_name": "string value",
    "price": 1,
    "currency": "string value",
    "renewal_count": 1
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "subscription_plan_name" : "string value",
   "price" : 1,
   "currency" : "string value",
   "renewal_count" : 1
]
PWInAppManager.shared().postEvent("Subscription renewal", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"subscription_plan_name" : @"string value",
   @"price" : @(1),
   @"currency" : @"string value",
   @"renewal_count" : @(1)
};
[[PushNotificationManager pushManager] postEvent:@"Subscription renewal" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("subscription_plan_name", "string value")
    .putInt("price", 1)
    .putString("currency", "string value")
    .putInt("renewal_count", 1)
    .build()

PushwooshInApp.getInstance().postEvent("Subscription renewal", attributes);
```
</TabItem>
</Tabs>

### 무료 체험 시작

사용자가 구독하기 전에 무료 체험을 시작하기로 선택하면 이 이벤트를 트리거합니다.

권장 속성:

*   free\_trial\_name: String
*   expiry\_date: Date

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Free trial started", {
    "free_trial_name": "string value",
    "expiry_date": "new Date()"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "free_trial_name" : "string value",
   "expiry_date" : NSDate()
]
PWInAppManager.shared().postEvent("Free trial started", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"free_trial_name" : @"string value",
   @"expiry_date" : [NSDate date]
};
[[PushNotificationManager pushManager] postEvent:@"Free trial started" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("free_trial_name", "string value")
    .putDate("expiry_date", new Date())
    .build()

PushwooshInApp.getInstance().postEvent("Free trial started", attributes);
```
</TabItem>
</Tabs>

### 구독 취소됨

이 이벤트를 사용하여 인앱 구독 취소를 추적합니다.

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Subscription cancelled");
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

PWInAppManager.shared().postEvent("Subscription cancelled", withAttributes: nil)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

[[PushNotificationManager pushManager] postEvent:@"Subscription canceled" withAttributes:@{}];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

PushwooshInApp.getInstance().postEvent("Subscription cancelled");
```
</TabItem>
</Tabs>

### 무료에서 유료로 전환

사용자가 앱을 무료로 사용하다가 유료 구독 요금제로 전환하면 이 이벤트를 트리거합니다.

권장 속성:

*   subscription\_plan\_name: String
*   price: Integer
*   currency: String
*   date: Date

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Conversion from Free to Paid", {
    "subscription_plan_name": "string value",
    "price": 1,
    "currency": "string value",
    "date": "new Date()"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "plan_name" : "string value",
   "price" : 1,
   "currency" : "string value",
   "date" : NSDate()
]
PWInAppManager.shared().postEvent("Conversion from Free to Paid", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"subscription_plan_name" : @"string value",
   @"price" : @(1),
   @"currency" : @"string value",
   @"date" : [NSDate date]
};
[[PushNotificationManager pushManager] postEvent:@"Conversion from Free to Paid" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("subscription_plan_name", "string value")
    .putInt("price", 1)
    .putString("currency", "string value")
    .putDate("date", new Date())
    .build()

PushwooshInApp.getInstance().postEvent("Conversion from Free to Paid", attributes);
```
</TabItem>
</Tabs>

## 미디어

### 검색

사용자가 앱에서 콘텐츠를 검색할 때 이 이벤트를 보냅니다.

권장 속성:

*   search\_query: String
*   category: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Search", {
        "search_query": "string value",
        "category": "string value"
    });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "search_query" : "string value",
   "category" : "string value"
]
PWInAppManager.shared().postEvent("Search", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"search_query" : @"string value",
   @"category" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Search" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("search_query", "string value")
    .putString("category", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Search", attributes);
```
</TabItem>
</Tabs>

### 콘텐츠 읽음

사용자가 특정 콘텐츠를 읽었을 때 이 이벤트를 트리거합니다.

권장 속성:

*   category: String
*   article\_id: String
*   author: String
*   published\_date: Date

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Content read", {
    "category": "string value",
    "article_id": "string value",
    "author": "string value",
    "published_date": "new Date()"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "category" : "string value",
   "article_id" : "string value",
   "author" : "string value",
   "published_date" : NSDate()
]
PWInAppManager.shared().postEvent("Content read", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"category" : @"string value",
   @"article_id" : @"string value",
   @"author" : @"string value",
   @"published_date" : [NSDate date]
};
[[PushNotificationManager pushManager] postEvent:@"Content read" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("category", "string value")
    .putString("article_id", "string value")
    .putString("author", "string value")
    .putDate("published_date", new Date())
    .build()

PushwooshInApp.getInstance().postEvent("Content read", attributes);
```
</TabItem>
</Tabs>

### 양식 제출

인앱 양식(예: Net Promoter Score), 콘텐츠 선호도 선택 및 기타 설문조사의 제출을 추적합니다.

권장 속성:

*   form\_name: String
*   url: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Form submission", {
    "form_name": "string value",
    "url": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "form_name" : "string value",
   "url" : "string value"
]
PWInAppManager.shared().postEvent("Form submission", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"form_name" : @"string value",
   @"url" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Form submission" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("form_name", "string value")
    .putString("url", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Form submission", attributes);
```
</TabItem>
</Tabs>

### 콘텐츠 공유됨

사용자가 소셜 네트워크, 이메일 또는 기타 채널을 통해 콘텐츠를 공유했을 때 이 이벤트를 트리거합니다.

권장 속성:

*   category: String
*   article\_id: String
*   author: String
*   published\_date: Date
*   button\_id: String
*   social\_media: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:

const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Content shared", {
    "category": "string value",
    "article_id": "string value",
    "author": "string value",
    "published_date": "new Date()",
    "button_id": "string value",
    "social_media": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "category" : "string value",
   "article_id" : "string value",
   "author" : "string value",
   "published_date" : NSDate(),
   "button_id" : "string value",
   "social_media" : "string value"
]
PWInAppManager.shared().postEvent("Content shared", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"category" : @"string value",
   @"article_id" : @"string value",
   @"author" : @"string value",
   @"published_date" : [NSDate date],
   @"button_id" : @"string value",
   @"social_media" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Content shared" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("category", "string value")
    .putString("article_id", "string value")
    .putString("author", "string value")
    .putDate("published_date", new Date())
    .putString("button_id", "string value")
    .putString("social_media", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Content shared", attributes);
```
</TabItem>
</Tabs>

### 콘텐츠 선호도

사용자가 관심 있는 특정 주제를 선택할 때 이 이벤트를 발생시킵니다.

권장 속성:

*   topic: String

<Tabs>
<TabItem label="JavaScript">
```javascript
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
    api.postEvent("Content preferences", {
    "topic": "string value"
  });
});
```
</TabItem>

<TabItem label="Swift">
```swift
// To use with iOS SDK, you can integrate this code:

let attributes: [String : Any] = [
   "topic" : "string value"
]
PWInAppManager.shared().postEvent("Content preferences", withAttributes: attributes)
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
// To use with iOS SDK, you can integrate this code:

NSDictionary *attributes = @{
   @"topic" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@"Content preferences" withAttributes:attributes];
```
</TabItem>

<TabItem label="Java">
```java
// To use with Android SDK, you can integrate this code:

TagsBundle attributes = new TagsBundle.Builder()
    .putString("topic", "string value")
    .build()

PushwooshInApp.getInstance().postEvent("Content preferences", attributes);
```
</TabItem>
</Tabs>