Search Unity

[Solved] Should I report Restore Transaction events via Analytics.Transaction?

Discussion in 'Unity IAP' started by myama, Apr 8, 2016.

Thread Status:
Not open for further replies.
  1. myama

    myama

    Joined:
    May 2, 2014
    Posts:
    14
    I'm using Unity 5.3.4f1 on a Mac.

    I use Analytics.Transaction() inside of the ProcessPurchase callback, which gets calls after purchasing and restoring transactions. Should I call Analytics.Transaction() when ProcessPurchase is called after RestoreTransactions?

    In other words will Unity Analytics report those RestorePurchase receipts as new income or will it know that it is a restored purchase?
    From the docs it is not clear to me if restoring transactions is a monetization event. I'd guess I should not report it, but just wanted to double check.


    Thanks
     
  2. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi myama,

    Are you using Unity IAP? If so, you don't need to use the Analytics.Transaction() event because that's built into the IAP system and is sent for you. If you use IAP AND send a separate transaction event you're revenue will be double counted.

    If you aren't using IAP, I would recommend not sending transaction events in your restorePurchase method. I'm not 100% sure, but I don't think our system would catch the duplication on those receipts. And even if it does, I think best practice would be to only send transaction events on actual purchases (vs restores), unless there is a use case for events being sent during restore that I'm not thinking of...Is there a reason you want to include transaction events in restorePurchases?
     
  3. myama

    myama

    Joined:
    May 2, 2014
    Posts:
    14
    Yes, I am using Unity IAP, so I will remove my call to Analytics.Transaction. Sorry if I missed in the docs that I should not add Analytics.Transaction if I am using Unity IAP. I was following the Monetization setup instructions for Unity Analytics and that is what it said to do.

    Thanks
     
  4. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi myama,

    Great! Glad I was able to provide that clarity. Sorry about the docs not mentioning that, we are working on getting them updated with all these little details! The Monetization setup existed before we had IAP and I guess we haven't mentioned in it that there is now two ways of tracking monetization - thanks for bringing it to our attention, we will add it to the updates!
     
Thread Status:
Not open for further replies.