Solved

Cross-Platform Unity Integration (beyond iOS and Android)

  • 21 September 2021
  • 4 replies
  • 68 views

Badge

Hello!

I was very disappointed to learn that the Amplitude Unity plugin only supports iOS and Android platforms. Unity game engine supports a variety of other platforms also:

For what purpose has the Unity integration been limited to iOS and Android?

Is it possible to integrate Amplitude for the other platforms, such as PC, Mac, Linux, Xbox, PlayStation, and WebGL?

Within Unity, could the HTTP API V2 be used instead of the Amplitude Unity plugin if platforms beyond iOS and Android are targeted (such as Unity + Windows/PC)?

icon

Best answer by MikkoKarvonen 22 September 2021, 06:51

View original

4 replies

Userlevel 4
Badge +2

Amplitude has been originally designed for tracking mobile application and website usage, which is reflected in the SDK platform choices.

However, there is no need to limit yourself to tracking these platforms. We are in a similar situation that we want to track platforms there is no SDK for. We are doing this via HTTP API with great success. It’s some extra work, as you need to get the data into correct JSON format and implement your own logic for sending the events, but I assume a platform like Unity should allow you to do that with reasonable ease.

Some tips based on our experiences with the HTTP API and multi-platform tracking:

  • Set up a separate Amplitude project for development phase. This allows you to send in test events and figure out the right format without polluting your production data.
  • Make sure you get the UserID set up correctly on all platforms. This helps you to identify the same user on different platforms.
  • Make sure you implement the data in exactly the same way on all platforms. Even just different capitalization (“Level” vs “level”) will give you two separate event property values instead of one. You can overcome this during the analysis, but it can be somewhat annoying.
  • Make sure you implement your Platform user property correctly when using HTTP API, as that does not track it automatically. This allows you to identify which platforms the users are using. You might also want to consider a property “OriginalPlatform” or something similar, set up when the user first starts using your product.
  • Think about whether you want to track the same platforms on the same or different Amplitude projects. Most likely you’ll want the data in one place, but if there are significant differences between the platforms, there might be a case for a separate project.
Badge

@MikkoKarvonenThis is very helpful! Thank you so much!

 

I understand the reasoning, given Amplitude’s original design for Mobile + Web. But there’s really no difference between analytics for games or applications. You have to define what you want to track either way.

 

That being said, I’m happy I can use the HTTP API, but I also think it would be smart for Amplitude to support more platforms in the Unity SDK. There is an opportunity to capture more customers that way!

Userlevel 4
Badge +4

Hello @REM5 Studios thank you for the feedback! My name is Eddie and I am part of the Support Team here at Amplitude. I will submit a feature request that you have recommended to our product team. 

Do you have a game for all the platforms mentioned or a subset of them? (i.e PC, Mac, Linux, Xbox, PlayStation, and WebGL) If so, which platforms?

Badge

Thank you very much @eddie.gaona ! I appreciate you passing this along and submitting a feature request.

While having Amplitude SDK support for all platforms that Unity supports would be ideal, the additional platforms that are most important to me (in order of importance) are: PC/Windows, WebGL, Mac, and PlayStation.

Specifically, I am a VR developer and my focus is on VR apps that are cross-platform, while also including a non-VR mode for certain platforms (so that it is accessible to the most amount of people). The targeted platforms will include: Android (Oculus Quest 1 & 2, Vive Focus 3, Pico), PC/Windows (Steam VR, Oculus, & non-VR mode), PlayStation (PSVR, & non-VR mode), WebGL (WebXR, WebVR, and non-VR mode), and Mac (non-VR mode).

I would love for Amplitude to be a turnkey solution for all of this! And I’m sure many others would also!

Reply