Closed LelvProgrammer closed 5 months ago
OneSignal.init({})
is an asynchronous method and you need to call await.
Try updating your code to this:
OneSignalDeferred.push(async function(OneSignal) {
await OneSignal.init({
appId: "XXXXXXXXXXXXXXXXXXXX",
});
OneSignal.User.addTag("test-tag", "whatever")
});
Thanks for bringing attention to this, our documentation needs to be updated Hope this helps. Let us know if you have any issues
I created a new one signal app, followed the steps of configuring the web script, copy-pasting the configuration added + calling the method for adding a tag, on the head of the index file
When I go to the onesignal dashboard, I see the new client registered, but no tags assigned to him. If I were to send a message filtering for tag, the person doesn't receive the message. I feel like I'm probably just missing something silly but can't put my finger onto what that is. Anyone can help?