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

917
Vistas
Google analytics: goal event is not getting triggered from my angular web application

I have created a goal in my google analytics dashboard and tried to trigger that event from my component.But it is not getting reflecting in google analytics dashboard goals section.

FYI-The application is connected fine with the script in index.js. Only issue with the goal event not getting reflected while login to the application.

I have also installed below package,but no change in result.

npm install --save-dev @types/google.analytics

HTML file

<div class="test">
        <p-button label="Submit" (onClick)="onSubmit()" styleClass="full-btn"></p-button>
</div>

ts file

 onSubmit(){
this.isSubmitted = true;
if(this.loginFormGroup.invalid) return;
this.auth.login(this.loginForm.email.value,this.loginForm.password.value).subscribe((user)=>{
  this.authError = false;
  this.localStroageService.setToken(user.token);
  ga('send', 'event', { eventCategory: 'Registration', eventAction: 'click', eventLabel: 'Regtracking', eventValue: 1});// This is not getting triggered

index.html

   <script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-XXXXXX-X');
</script>
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