사용자 통계
    • PDF

    사용자 통계

    • PDF

    기사 요약

    Classic/VPC 환경에서 이용 가능합니다.

    게임팟은 로그인이나 결제시에 모든 로그를 자동으로 저장합니다. 하지만 로그인이나 결제를 사용하지 않고 로그만을 저장하는 경우 logEvent 를 통해서 보내면 동일하게 저장이 가능합니다.
    별도의 설치가 필요하지 않으며, 기본 SDK 가 설치된 경우 logEvent 함수를 통해서 이벤트를 보낼 수 있습니다.

    주의

    로그인 / 결제를 사용하는 경우에는 자동으로 기록이 되어 해당 기능이 필요하지 않습니다.
    별도의 로그인과 결제를 사용하는 경우 통계 로그를 저장하는 경우에만 사용하기를 권장 드리며, 동시에 사용할 경우 로그가 중복으로 저장될 수 있습니다.

    사용자 ID 입력

    사용자 ID를 입력해 주셔야만 로그가 정상적으로 기록 됩니다.

    • Android
      NBase.setMemberId("userId");
      
    • iOS
      NBase.setMemberId(memberId: "userId")
      
    • Unity
      NBaseSDK.NBase.setMemberId("userId");
      

    로그인 후 이벤트 보내는 방법

    • Android
      NBase.trackEvent("loginlogs", mapOf("metadata" to "metadata")) { status, e ->
          if (e != null) {
              Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
          } else {
              Toast.makeText(this, status.toString(), Toast.LENGTH_LONG).show()
          }
      }
      
    • iOS
      let eventParam: [String: Any] = ["metadata": "metadata"]
      NBase.trackEvent(event: "loginlogs", params: eventParam) {result in
          switch result {
          case .success(let status):
              // success
          case .failure(let error):
              // failure
          }
      }
      
    • Unity
      var loginParam = new NBaseSDK.NBase.TrackingParameter(status: true, serverId: "server#1");
          NBaseSDK.NBase.trackEvent("loginlogs", loginParam, (status, error) => {
              if (error != null)
              {
                  Debug.Log(error.Message.ToString());
                  return;
              }
          });
          }
      }
      

    회원 가입 후 이벤트 보내는 방법

    • Android
      NBase.trackEvent("joins", mapOf("metadata" to "metadata")) { status, e ->
          if (e != null) {
              Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
          } else {
              Toast.makeText(this, status.toString(), Toast.LENGTH_LONG).show()
          }
      
    • iOS
      let eventParam: [String: Any] = ["metadata": "metadata"]
      NBase.trackEvent(event: "joins", params: eventParam) {result in
          switch result {
          case .success(let status):
              // success
          case .failure(let error):
              // failure
          }
      }
      
    • Unity
      var loginParam = new NBaseSDK.NBase.TrackingParameter(status: true, serverId: "server#1");
          NBaseSDK.NBase.trackEvent("joins", loginParam, (status, error) => {
              if (error != null)
              {
                  Debug.Log(error.Message.ToString());
                  return;
              }
          });
          }
      }
      

    결제 후 이벤트 보내는 방법

    • Android
      val eventParams = mapOf(
          "status" to true,
          "productId" to "productId",
          "paymentId" to "google",
          "orderId" to "order_id",
          "currency" to "USD",
          "price" to 0.99,
          "server_id" to "world#1",
      )
      GamePot.trackEvent("purchases", eventParams) {status, e ->
          if (e != null) {
              Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
          } else {
              Toast.makeText(this, status.toString(), Toast.LENGTH_LONG).show()
          }
      }
      
    • iOS
      let eventParams: [String: Any] = [
          "status": true,
          "productId": "productId",
          "paymentId": "google",
          "orderId": "order_id",
          "currency": "USD",
          "price": 0.99,
          "server_id": "world#1"
          ]
      NBase.trackEvent(event: "purchases", params: eventParams) {result in
          switch result {
          case .success(let status):
              // success
          case .failure(let error):
              // failure
          }
      }
      
    • Unity
      var purchaseParam = new NBaseSDK.NBase.TrackingParameter(
          status: true,
          productId: "P12345",    // 상품ID
          paymentId: "google",    // google, apple, amazon, one ...
          orderId: "Ord1234", 
          currency: "USD",
          price: 9.99,
          serverId: "Server1"
      );
      
       NBaseSDK.NBase.trackEvent("purchases", purchaseParam, (status, error) => {
          Debug.Log("[Unity] trackEvent...ok " + status);
          if (error != null)
          {
              NBaseSDK.NBase.showToast(error.Message.ToString());
              return;
          }
          NBaseSDK.NBase.showToast(status.ToString());
      });
      
    NameTypeDescriptionRequired
    productIdstring상품 아이디Y
    paymentIdstringgoogle, apple, amazon, oneY
    orderIdstring구매에 대한 영수증 번호Y
    currencystring화폐 단위Y
    pricedouble구매 가격Y
    serverIdstring서버 IDN
    • SDK는 운영 체제, 앱 버전 등과 같은 유용한 정보들로 이벤트를 자동으로 향상시킵니다.
    • 서버 자동 전송되는 로그를 직접 관리할 수 있습니다. 이 SDK는 자동으로 이벤트를 추적하지 않으며, trackEvent를 수동으로 호출해야 합니다. 그러므로 일반적으로 최소한 앱 시작 시에 이벤트를 추적하는 것이 권장됩니다.
    • trackEvent 함수는 백그라운드에서 실행되지 않습니다.
    • 사용자 정의 속성에는 문자열과 숫자 값만 허용됩니다.

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.