4

I'm setting up for the first time GameAnalytics in my Unity3D project. I'm try to figure out if there is a way to validate in app purchases for both android and iOS from it.

In the docs I found http://www.gameanalytics.com/docs/ga-data#business-event. I understood that you need to work with native sdks to get this feature, am I right?

Could it be an option to configure from the dashboard an android and an iOS game and then changing the keys in unity with precompilator instructions? (like #if UNITY_ANDROID)?

Massimo Frasson
  • 427
  • 3
  • 10

2 Answers2

2

I am an SDK developer @ GameAnalytics.

Yes. There is a way to make the GA servers validate Android and iOS IAP purchases in business events. From Unity.

Short story
You need to send the receipt in the business event after the purchase.

You can read our complete Unity tech guide in the Github Repository. Regarding IAP validation you should read this section. https://github.com/GameAnalytics/GA-SDK-UNITY/wiki/Business%20Event

About the keys
You should create a game for Android and iOS in our tool at go.gameanalytics.com

Inside the Unity Editor you can add platforms (Android / iOS) and then add specific keys to each. You can read more about the in-editor settings in the wiki docs as well. Including how to login and select games directly in the editor.

Let me know if you have any issues. You could also file a support case with our friendly support staff.

1

When you install the Game Analytics unity package, you are essentially installing the native libraries for each platform (Android, iOS, ...) located in the Plugins folder.

If you want to target multiple platforms in your code with an API like Game Analytics, I recommend you use the preprocessor tags as you mentioned since the functions from Game Analytics are platform specific.

Isaak Eriksson
  • 633
  • 1
  • 7
  • 16