Google analytics events not showing up

New Page

  • foyer
  • products
  • Google Analytics
  • The measurement
  • Measurement protocol (Google Analytics 4)

Was it helpful?

Problem solving

bookmark_border Stay organized with collections Save and categorize content according to your preferences.

  • In this page
  • no events
  • Invalid credentials

This guide describes common troubleshooting steps to correct common deployment errors.

no events

If your events aren’t showing up in Google Analytics, there are some common issues you should look out for.

First choose your client:

gtag.js firebase

  • Are you using the correct api_secret?

    Check that you are using api_secret for the correct stream. If you configure the measurement protocol for multiple streams, each stream will have its own secret.

  • Is your api_secret still valid?

    To help fight spam, you can revoke api_secrets. Make sure the api_secret you are using is still valid. Another user with access to your stream may have revoked access by mistake.

  • Is your api_secret correctly copied?

    api_secret is case sensitive. Check that api_secret in the Google Analytics UI is exactly the same as you use in your code.

  • No advertising_iduse

    advertising_id is not supported as a valid device identifier. Use app_instance_id if using Firebase and client_id if using gtag.js.

  • Are you using the correct firebase_app_id?

    Be sure to use the ID of a Firebase app. This value can be found in the Firebase console under: Project Settings  > General  > Your Apps  > App ID .

    It’s easy to confuse this value with app_instance_id, so be sure to use the correct one.

  • Are you using the correct app_instance_id?

    Be sure to use the specific identifier of a Firebase app install. This value must be retrieved via the Google Analytics SDK for Firebase.

    • Android – getAppInstanceId()
    • Kotlin – getAppInstanceId()
    • Swift – appInstanceID()
    • Objective-C – appInstanceID
    • C++ – GetAnalyticsInstanceId()
    • Unit – GetAnalyticsInstanceIdAsync()

    It’s easy to confuse this value with firebase_app_id, so be sure to use the correct one.

Invalid credentials

Since the measurement protocol supports Google Analytics IDs for the Firebase SDK and gtag.js, it’s easy to get confused about which IDs to use. The credentials you need to use vary depending on whether you’re using the Google Analytics SDK for Firebase or gtag.js. The identifiers you must use are described below:

Google Analytics SDK for Firebase

If you are using the Google Analytics SDK for Firebase, the credentials to use are:

  • firebase_app_id- Incluir este ID en los parámetros de consulta de la solicitud. Esta identificación identifica de forma única su aplicación Firebase. Todos los usuarios de su aplicación tendrán el mismo firebase_app_id. Se encuentra en la consola de Firebase en: Configuración del proyecto > General > Tus aplicaciones > ID de la aplicación
  • app_instance_id- Incluya este ID en el cuerpo POST de la solicitud. Este ID identifica de forma única una instalación determinada de una aplicación de Firebase. Este valor será diferente para cada instalación de su aplicación. Los métodos para solicitar este valor para cada plataforma Firebase son los siguientes:

    • Android – getAppInstanceId()
    • Kotlin – getAppInstanceId()
    • Swift – appInstanceID()
    • Objective-C – appInstanceID
    • C++ – GetAnalyticsInstanceId()
    • Unidad – GetAnalyticsInstanceIdAsync()

No debe usar lo siguiente:

  • firebase_instance_id- Esta identificación no debe incluirse en su solicitud. Este ID se usa para identificar una instancia determinada de la aplicación, pero es específico de Firebase. Se utiliza para tareas como mensajes FCM.


Si usa gtag.js, las ID que debe usar son:

  • measurement_id – Include this ID in the query parameters for the request. This ID uniquely identifies a Data Stream. All users of your website will have the same measurement_id. Found in the Google Analytics UI under: Admin > Data Streams > choose your stream > Measurement ID
  • client_id – Include this ID in the POST body for the request. This ID uniquely identifies a given user instance of a web client. This value will be different for every user of your app. See [these examples] for how to retrieve this value.

¿Fue útil?

Recommended for you

Sending events

This guide explains how to format and send requests to the Google Analytics Measurement Protocol. To send an event, make an HTTP POST request to the following endpoint: A valid request requires two sets of parameters that vary if you’re

Updated Sep 5, 2022

User properties

User properties describe segments of your user base, such as language preference or geographic location. Analytics automatically logs some user properties. If you want to collect additional properties, you can set up to 25 additional user properties

Updated Jun 2, 2022

Measurement Protocol Reference

There are two parts to sending data to Google Analytics using the Measurement Protocol: This document describes how the transport and payload are formatted. You send data using the Measurement Protocol by making HTTP POST requests to the following

Updated Jun 2, 2022

Google analytics events not showing up

Ask Question

Asked 6 years, 2 months ago

Modified 3 years, 1 month ago

Viewed 30k times

Reportar este anuncio

This question shows research effort; it is useful and clear


This question does not show any research effort; it is unclear or not useful


Bookmark this question.

Show activity on this post.

New to google analytics so bear with me. I added the event tracking to my code, but when i check in the reporting behavior event tab it’s blank. Here is my code.

<script> (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){ (i[r] .q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName( o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,’script’,’// analytics.js’,’ga’); ga(‘create’, ‘UA-XXXXXXXXX’, ‘auto’); ga(‘send’, ‘page view’); </script>

here is an example of my a tag

<a href=”” target=”_blank” class=”app-logo” ga(‘send’, ‘event’, ‘Link’, ‘Click’, ‘’) ;>

  • Google Analytics


Share a link to this question

Copy link CC BY-SA 4.0


Follow this question to receive notifications

edited on May 29, 2018 at 6:35 PM

Flimzy user avatar


70.1k 15 15 gold badges 132 132 silver badges 171 171 bronze badges

requested on July 11, 2016 at 8:07 p.m.

Zachary Almero User Avatar

Zachary Almero Zachary Almero

117 1 1 gold badge 1 1 silver badge 7 7 bronze badges


  • 1

    Have you watched the tab in real time?

    –Guilherme Torres Castro

    Jul 11, 2016 at 8:13 PM

Add a comment | 

2 answers 2

Sorted by: Reset to default

Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first)

This answer is helpful


This answer is not helpful

View activity on this post.

Dans google-analytics, pour le bon site Web, regardez sur la page “temps réel/événements” et voyez si des événements y apparaissent (ils devraient apparaître ici en quelques secondes, après avoir été déclenchés sur votre site Web).

Si ce n’est pas le cas, vous avez peut-être ajouté un filtre pour filtrer les événements générés par le trafic de votre propre IP. Vous pouvez trouver ce filtre sous “admin” puis “tous les filtres”. Si c’est le cas, supprimez-le (ou modifiez temporairement l’adresse IP, afin qu’elle ne corresponde pas). Après cela, générez quelques événements sur votre site Web et regardez à nouveau sur la page google-analytics, sous la page trafic / événements en temps réel.

If they work in real time, it should also work in delayed time (but it can take 24-48 hours to appear there!)


Share a link to this answer

Copy link CC BY-SA 3.0


Follow this answer to receive notifications

edited9 January 2017 at 07:03 PM

answeredJanuary 9, 2017 at 6:46 PM

kalmiya user avatar

kalmyya kalmyya

2,768 29 29 silver badges 37 37 bronze badges


  • seven

    Most valuable feedback to debug the issue!

    – Restarting systems

    May 5, 2018 at 9:08 am

  • of them

    Any advice on what might cause events to show up in real-time, but not in the non-realtime data?

    – yas4891

    Mar 11, 2019 at 5:12 PM

  • Local IP address being blocked was my issue too. I hopped on a VPN and events started coming right through. This tip helped me a lot.

    – hellojason

    Jun 19, 2019 at 17:06

  • 1

    Another common cause of this problem is Google Tag Manager issue, see

    – mechatronize

    Nov 12, 2019 at 5:17 am

Add a comment | 

Report this ad

This answer is useful


This answer is not useful

Show activity on this post.

Not sure if this just a typo in your example, but you are missing the event handler in your link:

<a href=”” target=”_blank” class=”app-logo” onclick=”ga(‘send’, ‘event’, ‘Link’, ‘Click’, ‘example. com’);”></a>

The event handler (“onclick”) is the bit that specifies which action should trigger the javascript code. If you just dumped the event call into HTML, it won’t even be recognized as JS.


Share a link to this answer

Copy link CC BY-SA 3.0


Follow this answer to receive notifications

answered on Jul 11, 2016 at 8:35 PM

Avatar of Eike Pierstorff

Eike Pierstorff Eike Pierstorff

31.4k 4 4 gold badges 39 39 silver badges 59 59 bronze badges

of them

  • that’s what I was missing. Thank you very much, nothing is showing now, but I’m sure there is a 24 hour delay, right?

    –Zachary Almero

    Jul 11, 2016 @ 9:06 PM

  • You should see events in the tab in real time, and you can use a tool like Google Tag Assistant (…) to confirm if everything is working. But yes, there is some delay due to processing time.

    –Eike Pierstorff

    Jul 12, 2016 @ 5:26 AM

Add a comment | 

Your answer

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid…

  • Ask for help, clarification, or respond to other responses.
  • Make statements based on opinion; back them up with references or personal experience.

To learn more, check out our tips for writing great answers.

saved draft

Draft rejected

Sign up or log in

Sign up with Google

Sign up using Facebook

Sign up using your email and password


Post as guest



Required, but never displayed

Post as guest



Required, but never displayed

Post Your Answer Discard

Al hacer clic en “Publicar su respuesta”, accept our service terms, privacy policy and cookie policy

No es la respuesta que estás buscando? Explorar otras preguntas etiquetadas

  • Google Analytics

o haga su propia pregunta.

  • The overflow blog
  • Tendencias de overflow of pila: activity of the site between week and end of week

  • No dejes que el software te robe el tiempo (Ep. 491)

  • Destacado in Meta
  • Recientes cambios de contrast de color y actualizaciones de accesibilidad

  • ¡Revisor for the border! O una solicitud para mjorar la guía de incorporation para nuevos…

  • Updating of collections: recognized files, articles and GitLab

  • ¿Debo explicar las respuestas de solo código de otras personas?

Report this ad



Events are not tracked in the new Google Analytics configuration (analytics.js)


How do I track events with Google Analytics on a SquareSpace site?



google universal analytics events sent but not received by analytics


Google Analytics – track multiple events in a single HTTP request


Google Analytics eCommerce tracking not working with custom PHP


django finds ga.html to add Google Analytics


No matching customer found for package name (Google Analytics) – multiple productFlavors & buildTypes


Remove query parameters from URL before sending to Google Analytics


Google Analytics code not working on Opera


Unable to send Event Hit in Google Analytics using measurement protocol


Can’t get the HTML from a URL that has a Google script at the bottom?

burning questions from the net

  • Why is the Wizard of Oz scarecrow wrong about the Pythagorean theorem?
  • Short horror story I read in the 70s where the protagonist witnesses how a monster disguised as a human eats someone.
  • Do movie studios need permission to use an AI recreation of an actor’s voice in their works?
  • How important is having multiple gears on an e-bike?
  • What is the process by which humanity acquires prescience immunity in the Dune series?
  • Trying to identify a novel by Poul Anderson
  • How to tell the user that he has not completed a prerequisite?
  • What is it called and what causes it? Bright reflections along the contrasting edges
  • Salon switch does not turn on after pressure washing
  • What license can protect the owner of a project and give ownership of voluntary contributions?
  • When Artemis lacks perspective
  • Why can’t you just say “My sister made me a doll”?
  • How to solve this sudoku without guessing?
  • Can prisoners of war be exchanged against their will?
  • Is Mushin (無心 “mindless”) a truth?
  • Application of Martin’s axiom to families of functions
  • My government (China) canceled my passport. I am in Malaysia, what can I do?
  • Why does Windows 10 list “Windows_NT” as the operating system?
  • Is there a routine like FETCH, STASH and SWAP to transfer data between memory banks 0 and 1 in the C128?
  • How can I measure the actual amperage of my circuits so I can compare it to the correct fuses/breakers?
  • What caused the nervousness in the DART video when he approached Dimorphos?
  • In early modern English, are there examples of the progressive “a- + gerund” construction where the gerund begins with a vowel?
  • Are university groups allowed to use grant funds for currency hedging?
  • Free-electron lidar counter?

hotter questions

question flow

Subscribe to RSS

question flow

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Video Google analytics events not showing up

Related Posts

Fatal error require failed opening required

Contents1 Fatal error of PHP No se pudo to open the archive requerido2 Subscribe to RSS3 About WPML3.1 From day one, our priorities have remained the same…

Your media file could not be processed.

Contents1 Fixed: Twitter Error “Your media file could not be processed”1.1 freno de mano1.2 ClipChamp Créer1.3 FilmoraGo1.4 adobe sparkle2 Video Your media file could not be processed….

Gravity forms not sending email

Contents1 [SOLVED] Why doesn’t Gravity Forms send email?1.1 How does Gravity Forms send email?1.2 Résoudre les problèmes liés aux formulaires Gravity qui n’envoient pas d’e-mail1.3 Configure Gravity…

This webpage is not founderr_file_not_found

Contents1 Install and manage extensions1.1 Install trusted extensions1.2 Agregar o eliminar el acceso a un sitio específico1.3 Hide extensions1.4 Show extensions2 5 Ways To Permanently Fix Chrome…

Continue to this website not recommended missing

Contents1 Ignore the “Continue to this website (not recommended)” message1.1 publication information1.2 Information1.3 Contents1.4 Admin Items2 Internet Explorer 10 ‘Continue to this website’ is missing option2.1 Similar…

Error loading stream id not found on server

Contents1 JWPlayer 6 error message “Error loading stream: ID not found on server”1.1 Inscrivez-vous ou connectez-vous1.2 Post as guest1.3 Post as guest2 Subscribe to RSS3 Problems with…