How to send data to Google Analytics 4

How it works

When you receive data about users’ activity and the launcher’s behavior from Google Analytics 4 as events, the data is sent in the payload as listed in the table below.

DimensionDescription
Distrubution platformThe platform that was used to open the launcher.
Possible values: Xsolla, Steam.
LanguageLauncher language.
Page titleLauncher screen. Possible values: Starting screen, Login screen, Game screen, Game store screen, Game news screen, Opened content screen, Settings screen, Custom tab screen.
Platform game IDGame ID on the platform. If the platform is Xsolla, then a Publisher Account project ID is passed.
Stream nameLauncher name.
Launcher project IDLauncher project ID from Publisher Account.
Example: 147 is a project ID for https://publisher.xsolla.com/72209/projects/173640/new-launcher/147
Login project IDLogin project ID.
App versionLauncher version.
Build numberBuild number.
Example: If the launcher version is 3.0.49-latest.1 then the build number is 1.
Window sizeLauncher window size.
Example: 800x600.
Screen resolutionScreen resolution.
Operating system, Operating system with version, OS version.User agent for detection of user’s operating system.
Publisher Account game IDID from Publisher Account of the game to which the content is related. The field will be empty if the content is not game-related.
City, City ID, Continent, Continent ID, Country, Country ID, Region, Region ID, Subcontinent, Subcontinent IDGeographical data.
The tables below show information about additional fields for certain events. All outgoing events are grouped based on their type.

General events

EventDescription
launcher_startLauncher starts. This is not sent when the launcher is started after an update.
close_appLauncher closing. This is not sent when the launcher is closed before an update.

UI events

EventDescription
page_viewA user opened a launcher screen.
logoutA user clicked Log out.

Launcher update events

EventDescription
launcher_update_check_startLauncher starts to check for updates.
launcher_update_check_completeLauncher finished checking for updates. The additional value field has the update_found value if there is a newer version found on CDN. Otherwise, the value is no_updates.
launcher_update_check_skipA user skipped the launcher update.
launcher_update_download_startLauncher started downloading the update.
launcher_update_download_completeLauncher finished downloading the update.
launcher_update_startLauncher finished the update.
launcher_update_completeLauncher is updated successfully.

Game ownership events

EventDescription
purchaseA change of a purchase status. Additional fields:
  • currency — three-letter currency code per ISO 4217.
  • value — nominal purchase amount.
  • transaction_id — payment ID in Xsolla’s system.
  • coupon — coupon code.
  • itemsitem parameters.

Content events

EventDescription
content_viewMore than 75% of a content was displayed. For the content that has the group status the event is not sent. Additional fields:
  • content_name — a content ID.
  • content_name — a content name.
  • content_type — a content type.
  • banner_type — a banner type.
  • target_game_id — an ID from Publisher Account or a Steam App ID of the game, the link leads to.
  • content_link — URL address if the content type is link or video.
content_clickA user clicked a content element.

Authorization events

EventDescription
loginA user was successfully authenticated in the launcher. Additional fields:
  • auth_type — authentication option.
  • method — social network used forauthentication.

How to get it

  1. Sign up for Google Analytics and log in to your account.
  2. Create and edit custom dimensions in Google Analytics as shown in the table below.
FieldDimensionScopeDescription
analytics_target_game_idAnalytics Target Game IDEventAn ID from Publisher Account or a Steam App ID of the game, the link leads to.
auth_typeAuth TypeEventAuthentication option passed in JWT. Possible values:
  • social — social login.
  • phone — passwordless login via a one-time code sent to a phone number.
  • email — passwordless login via a one-time code sent to an email.
  • xsolla_login — сlassic login via a username/email and password using Xsolla login data storage.
  • firebase — сlassic login via a username/email and password using Firebase data storage.
  • playfab — сlassic login via a username/email and password using Playfab data storage.
  • proxy — сlassic login via a username/email and password using custom data storage.
  • device — login with device ID.
  • server_custom_id — login by custom ID (user ID generated on your server).
content_idContent IDEventContent tile ID.
content_linkContent LinkEventURL address if the content type is link or video.
content_nameContent NameEventContent tile name in English.
content_typeContent TypeEventContent type. Possible values: news, link internal, link external, video.
distribution_platformDistribution PlatformEventThe platform that was used to open the launcher.
Possible values: Xsolla, Steam.
game_nameGame NameEventGame name in English.
game_platformGame PlatformEventGame platform. Possible values: Xsolla, Steam.
build_numberLauncher Build NumberEventBuild number.
Example: If the launcher version is 3.0.49-latest.1 then the build number is 1.
launcher_project_idLauncher Project IDEventLauncher project ID from Publisher Account.
Example: 147 is a project ID for https://publisher.xsolla.com/72209/projects/173640/new-launcher/147
app_versionLauncher VersionEventLauncher code version.
Example: If the launcher version is 3.0.49-latest.1 then the launcher code version is 3.0.49-latest.
login_project_idLogin Project IDEventLogin project ID.
platform_game_idPlatform Game IDEventGame ID on the platform. If the platform is Xsolla, then a Publisher Account project ID is passed.
publisher_account_game_idPublisher Account Game IDEventID from Publisher Account of the game to which the content is related. The field will be empty if the content is not game-related.
target_game_idTarget Game IDEventAn ID from Publisher Account or a Steam App ID of the game, the link leads to.
window_sizeWindow SizeEventLauncher window size.
Example: 800x600.
  1. Click Admin in the side menu.
  2. Create a Google Analytics 4 property.
  3. Add a data stream:
    1. Select the Web type.
    2. In the URL field enter any URL address.
  4. Copy the value of the Measurement ID field in the settings of the data stream.
  5. Open your project in Publisher Account.
  6. Click Launcher in the side menu.
  7. Find the launcher on the dashboard and click Edit launcher.
  8. Go to Settings > General information > Analytics.
  9. Paste the Measurement ID in the Google Analytics 4 Measurement ID field.
  10. Click Save changes.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!
Last updated: January 22, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!