Right after doing the initial setup in my main.lua I used the following snippet to tag devices by platform. Just testing the tags.
if isIOS == true then
GameThrive.TagPlayer(“Platform”, “IOS”)
else
GameThrive.TagPlayer(“Platform”, “Android”)
end
And I got a nasty stack trace telling me that the plugin can’t get the Player_ID yet… Of course the backend needs some time to register the new device… So I run the same code again and no error… Now tagging happens nicely.
So as a best practice, it seems as though we need to either delay the tagging a little bit after the initial run of the app or perhaps play it safer by using GameThrive.IdsAvailableCallback(IdsAvailable) before attempting to tag. Would you agree?
How would you do this? Thanks for your suggestions.
Hi Ksan. Yes, for now you should wait until GameThrive.IdsAvailableCallback is triggered.
We’ll be updating the library later this week so that this happens automatically (We will queue up tags and submit them behind the scenes once the device is registered with our system).
Hi, just checking in to see if the queueing update has gone live. I’m still seeing this problem so I was wondering if I should wait or code in the check before you tag approach discussed above. Thanks for your guidance.
Hey Ksan. Haven’t gotten to this yet unfortunately – we’re in the process of getting some of our other SDKs into good shape (Almost done!) and then we’ll circle back to this. We’ll likely get to it by the end of the week.
If you need something sooner then the IdsAvailableCallback solution should definitely work.
Here’s an (untested) example of how you might do it now:
Hi Ksan. Yes, for now you should wait until GameThrive.IdsAvailableCallback is triggered.
We’ll be updating the library later this week so that this happens automatically (We will queue up tags and submit them behind the scenes once the device is registered with our system).
Hi, just checking in to see if the queueing update has gone live. I’m still seeing this problem so I was wondering if I should wait or code in the check before you tag approach discussed above. Thanks for your guidance.
Hey Ksan. Haven’t gotten to this yet unfortunately – we’re in the process of getting some of our other SDKs into good shape (Almost done!) and then we’ll circle back to this. We’ll likely get to it by the end of the week.
If you need something sooner then the IdsAvailableCallback solution should definitely work.
Here’s an (untested) example of how you might do it now: