기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Analytics

Unity SDK

Client API

Analytics

이 페이지는 선택한 언어로 제공되지 않습니다.
LiveOps
​
​
Analytics
  • Overview
  • Get started
  • Pricing
  • Concepts
  • Tutorials
    • Create a custom event
    • Record an event
    • Record events with a custom user ID
    • Record transaction events
    • Record ad impression events
    • Copy custom events to another environment
    • Create a custom dashboard
    • Edit a custom dashboard
    • Create a funnel
    • Track user acquisition
    • Create a custom audience
    • Run a query with SQL Data Explorer
    • Query parameter values with SQL Data Explorer
    • Optimize SQL Data Explorer queries
    • Set up Data Access
    • Record an event with the REST API
    • Generate a unique user ID with the REST API
    • Request data deletion with the REST API
    • Debug event reporting
    • SDK 5.0.0 migration
    • Migrate to Unity 6.2 with Analytics SDK 6.1.0
    • Request game data deletion
  • Reference
  • Privacy and consent
  • FAQ
  1. Unity Analytics

Record an event

Record and send events from your game to Analytics to track player behavior and game activity.
읽는 시간 3분
최근 업데이트: 9달 전

Whether you are recording a standard event provided by Unity Analytics or a custom event that you have created especially for your game, the way to send data to Analytics is the same. Events must conform to a schema that exists on the dashboard or else they are rejected as invalid. You can view your configured events, and create new custom events, in the Event Manager.
To make it easy to record events that are correctly structured, the SDK provides helper classes for standard events and a base class you can extend for custom events.
Events are recorded by building an instance of an
Event
class and passing it into the
AnalyticsService.Instance.RecordEvent(...)
method as in this example:
MyEvent myEvent = new MyEvent{ FabulousString = "hello there", SparklingInt = 1337, SpectacularFloat = 0.451f, PeculiarBool = true};AnalyticsService.Instance.RecordEvent(myEvent);
You can also record a custom event that has no parameters by using its name alone:
AnalyticsService.Instance.RecordEvent("myEvent");
참고
these API methods changed in version 5.1.0 of the SDK. Please ensure you have the latest version of the SDK installed!
Events recorded by the Analytics SDK are batched and uploaded automatically every 60 seconds.
Once your events have been uploaded, you can view them in the Event Browser.
참고
The Analytics backend rejects events as invalid under the following scenarios:
  • The timestamp the event was collected on the user's device is greater than 30 days earlier than the timestamp of when the event is ingested into the backend service.
  • The timestamp the event was collected on the user's device is greater than 24 hours ahead of the timestamp of when the event is ingested into the backend service.
참고
If you are using the REST API instead of the SDK, you are responsible for populating, recording and uploading events. For more information, see the REST API page.

Automatic events

The SDK automatically populates every event with common parameters, such as
userID
,
sessionID
,
eventTimestamp
,
eventUUID
and
platform
, so you don't need to worry about these.
The SDK also automatically records a number of standard events for you.

Unity 6.2 and later with Analytics SDK 6.1 and later

Event

Description

gameStarted
Recorded when consent is granted or during
InitializeAsync()
if consent is already granted.
clientDevice
Recorded when consent is granted or during
InitializeAsync()
if consent is already granted.
newPlayer
Recorded if the user ID has changed. This recording occurs either when consent is newly granted, or during
InitializeAsync()
if consent was already granted at that time.
gameRunning
Recorded every 60 seconds if no other events have been recorded in that time.
gameEnded
Recorded when the game is closed. Note that if Unity is not allowed to shut down gracefully by the operating system, this may not occur, or may be cached to disk for upload at the start of the next session.
To learn about the standard event classes, including ones that you must record manually, refer to the list of standard events page.

Unity 6.1 and earlier, or Analytics SDK 6.0 and earlier

Event

Details

gameStarted
Recorded the first time
StartDataCollection()
is called in a session.
clientDevice
Recorded the first time
StartDataCollection()
is called in a session.
newPlayer
Recorded the first time
StartDataCollection()
is ever called for the given user ID.
gameRunning
Recorded every 60 seconds if no other events have been recorded in that time.
gameEnded
Recorded when the game is closed. Note that if Unity is not allowed to shut down gracefully by the operating system, this may not occur, or may be cached to disk for upload at the start of the next session.
For more information about the standard event classes, including ones that you must record manually, see the list of standard events page.

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Automatic events

      • Unity 6.2 and later with Analytics SDK 6.1 and later

      • Unity 6.1 and earlier, or Analytics SDK 6.0 and earlier


이 페이지의 문제 보고