Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
How to add Tag to OneSignal using Android Web View app?

I have a web view app with OneSignal integrated into it. All I'm trying to do is add tags to that user when clicked on a button in OneSignal using the below code :

<button onclick="buttonclicked()" >some</button>

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
<script>
  window.OneSignal = window.OneSignal || [];
  OneSignal.push(function() {
    OneSignal.init({
      appId: "xxxxx",
    });
  });
  
  
function buttonclicked() {
    console.log("click");
    OneSignal.push(function() {
     OneSignal.sendTags({sub_url:window.location.href, topic:'tags'}).then(function(tagsSent) {
         console.log("tagssent:" + JSON.stringify(tagsSent));
     });
    });
}
</script>

I followed exactly the same procedure as in the documentation

Not sure what went wrong, when I trigger the function through the app, the data is not being posted to OneSignal's tags field.

Any help is greatly appreciated.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda