Search Unity

Question Analytics (New) - Transaction Events

Discussion in 'Unity Analytics' started by PeachyPixels, Apr 26, 2022.

  1. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Hello!

    I was just reading one of the Analytics links posted this morning.

    https://resources.unity.com/player-engagement-center/understanding-event-tracking-in-games

    It states the transaction event is automatically sent if Unity IAP is used. Is this so?

    I'm dispatching them manually and don't ever recall seeing doubled-up events in Charles Proxy or the dashboard (when testing). I'm also sure previous forum discussions have indicated they need to be manually dispatched.

    Either way, does the same apply to the new transactionFailed event as well?

    Any help would be much appreciated.
     
    Last edited: Apr 26, 2022
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @PeachyPixels Yes, we are actively working on this very issue! Once the Analytics beta officially goes live, we will be introducing an updated version of Unity IAP to go along with it. It's my understanding that both the transaction and transactionFailed events will indeed be automatically sent by IAP. You'll probably want to wait on further Charles testing until that time and we will confirm the behavior.
     
    PeachyPixels likes this.
  3. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Many thanks @JeffDUnity3D

    Understood. So send them manually for now, but remove them when the updated IAP is released.
     
  4. user1dedalord

    user1dedalord

    Joined:
    May 23, 2019
    Posts:
    10
    Hello,

    @JeffDUnity3D Is there any updates on this?

    As I understand the recommended flow for now is to disable tracking from Unity IAP and manually track transactions with Analytics.

    Is there a way to specifically disable the transaction event from Unity IAP? In our case we are seeing transaction events being triggered by it.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Which Analytics version are you using? You might want to wait until the Analytics beta goes live, we will be coming out with a matching/updated version of IAP also and the current behavior may change.
     
  6. user1dedalord

    user1dedalord

    Joined:
    May 23, 2019
    Posts:
    10
    We are using the UGS Analytics beta, the main issue that we are trying to solve is that Unity IAP is automatically triggering all purchases events in the production environment, even when Analytics is initialized in the development environment.
    Any hints on what might be causing that?

    Thanks!
     
  7. clarec_unity

    clarec_unity

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    47
    Hey,

    Are you using the UGS Analytics SDK and do you also have Legacy Analytics enabled on your project? If so, are you in a position to disable that service? Legacy Analytics isn't environment aware so the data continuity pipeline that we have in place might be the root cause.

    Thanks,
    Clare
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What version of Analytics and IAP are you using? Please be using Analytics 4.0.1 and IAP 4.2.0-pre.2 Please see my previous comment about UGS Analytics going live, the current behavior you are seeing would change.
     
  9. user1dedalord

    user1dedalord

    Joined:
    May 23, 2019
    Posts:
    10
    @clarec_unity, @JeffDUnity3D thank you for the quick responses!

    In the Unity Dashboard, the Legacy Analytics section shows a "Go to the Editor to enable Unity Analytics for your project" message, so I will asume that is not active. We did implement the IAP plugin before adding the Analytics, I'm not sure if some legacy thing got automatically enabled at that point.

    We have Analytics Runtime 2.0.0-pre.2, Analytics 3.0.0-pre.2 and In App Purchasing 3.2.3 packages.

    I will try to update them to the latest versions.

    I will keep an eye on the UGS Analytics going live, our game might go live near the same date too, so probably we will need to do an update after that.

    Thanks!
     
    clarec_unity likes this.
  10. user1dedalord

    user1dedalord

    Joined:
    May 23, 2019
    Posts:
    10
    @clarec_unity, @JeffDUnity3D

    Updating the packages did the trick for Android, now the IAPs are being correctly tracked.

    But there it seems to be an issue on iOS, the transaction events are being triggered in the environment selected and also in production.

    Is it possible that there is a bug in the IAP 4.2.0-pre.2 plugin?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes it is possible. We are looking into it.
     
  12. user1dedalord

    user1dedalord

    Joined:
    May 23, 2019
    Posts:
    10
    Thanks! For now as a workaround we are ignoring the default production environment. Since the problem is having duplicating events, simply having a separate environment is good enough.
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Recent IAP versions required Legacy Analytics. Can you share a screenshot of your Services window in the Unity Editor? Or you could provide your Unity ProjectID in a private message here and I could check.
     
  14. user1dedalord

    user1dedalord

    Joined:
    May 23, 2019
    Posts:
    10
    Sure, here's the Services window. I'll dm you the project Id.

    Screen Shot 2022-06-14 at 11.52.57 AM.png
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    ProjectID is not needed. You can see that Legacy Analytics is indeed enabled.
     
  16. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Hey @JeffDUnity3D

    This is literally the last item on the list before I hit the production build button! :)

    Currently my game is configured like so...

    Legacy Analytics: Not Installed (Although still call Analytics.initializeOnStartup = false - is it needed?)
    Beta Analytics: Installed 4.0.1
    Purchasing: Installed 4.1.5

    Because I'm using Purchasing 4.1.x (rather than 4.2.x) I'm dispatching transaction events myself.

    Does Purchasing 4.1.x still require legacy analytics? If so, what happens if it's not installed?

    I've run through various purchase scenarios (on device builds) and they certainly seem to work, so the lack of Legacy Analytics doesn't seem to be an issue.

    I'm very close to launch and not sure if to leave as is or install 4.2.x

    Any advice would be much appreciated.
     
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please provide a Charles Proxy capture and remove all doubt! https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity . To your question, nothing would "happen". The events are only used for read-only revenue reporting on the Unity dashboard. Revenue will always be the most accurate on the respective store dashboards.
     
  18. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    705
    Thanks Jeff. I've decided to stick with 4.1.x for now. It appeared to work well on all platforms / test flights, so don't want to rock the boat this late in the day. I'll move to 4.2.x post launch.