Large difference in revenue between Unity Analytics and Google Play Console

Hi,

we are seeing large difference in revenue between Unity Analytics and Google Play Console.
Our revenue on Google Play Console is 50$, but in Unity Analytics it says on 16.9.2017 that we have 1000$ unverified revenue, on other days it is 800$ and 500$.

I’ve read on forums and Unity answers what is unverified revenue, but we are asking is it possible that there is so much fraud or something else. I mean 1000$ on one day and 50$ for all time is large difference. Also, we had canceled in app purchases events that day, but it isn’t near 1000$.
Can you tell us if it’s possible that we made mistake implementing in-app or it is mistake within Unity Analytics?

I’ve attached Unity Analytics screenshot and our google report for September revenue.

Thanks in advance :slight_smile:


It is likely fraud attempts. Are you using Receipt Validation? Integrating Client Side Receipt Validation is one approach to protecting against fraud: Unity - Manual: Receipt validation It’s a cryptographic verification of the transaction.

Yes, I saw that. But I don’t have non-consumable products in game. As I understand, Receipt Validation is for in-app purchases that can be only bought once?

Every purchase has a receipt. If you want to open a support ticket and provide your ProjectID/UPID, we can check the back end and look for repeated purchases from the same IP for example, which is a fraud pattern. In your Analytics Dashboard, click on the Support tab

Ok, thanks.

Just one question. It isn’t perfectly clear to me what exactly I need to do, I’m reading documentation for Receipt Validation. Do I just need to enter public key from google play? Or I need also to implement sample code from here ?
Because I really don’t understand how ti implement that code in my game. Is there any sample?

Thanks in advance :slight_smile:

There is a code example at the link provided. If you haven’t entered in your Google key in the Analytics Dashboard, all revenue will show as unverified. Please visit your Analytics Dashboard, and you should be prompted. You will want to go to the Configure tab (sometimes located under More) at https://analytics.cloud.unity3d.com

Hi,
I tried implementing receipt validation, but it’s throwing IAPSecurityException when I install apk on device and also when I upload closed beta test on google developer console. I followed guide on Unity documentation, so my question is, will it work in production, or something is wrong with implementation?

Hard to tell without seeing your code, many developers are successfully using Receipt Validation. Can you pinpoint the line in code that is throwing the exception?

I used code in link you sent me. See in attached photo.

Also to mention, test user is charged

Did you provide the encoded root certificate for both platforms (the tangle files)?

I did enter key from google developer console Services & APIs, but as I understand, I don’t need to do that for iOS. Also Apple Tangle and GooglePlayTangle have been generated when I clicked Obfuscate Secrets

What is the value of the purchasedProduct.receipt parameter?

This is debug log that we get:

{“Store”:“Google Play”, “TransactionID”:“Some ID”,… and other json values. If you need screenshot I can send it to you.

After that IAPSecurityException is thrown

Do you need additional information, or should I wait for response?

Are you testing the receipt for an actual purchase? Also, this may help [Solved] CrossPlatformValidator exceptions

Yes, test user is charged on credit card. Also, that link is not helping me understand the problem, because my code is catching IAPSecurityException, it’s not crashing with other exception that aren’t catched.

It it likely a valid IAPSecurityException such as a fake or test purchases as described in the link.