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

113
Vistas
Basic usage of Google Analytics Plugin for Unity3D

I'm trying to get analytics from a mobile app developed in Unity3D using Google Analytics Plugin for Unity. I've tried the simplest program, it doesn't throw errors but 48 hours later there's no data in Google Analytics dashboards. Here's the complete example:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player : MonoBehaviour {
    public GoogleAnalyticsV4 ga;
    public UnityEngine.UI.Text myText;
    private void Start() {
        try {
            ga.StartSession();
            ga.LogScreen("MAIN_SCREEN");
            myText.text = $"<b>No errors</b>";
        }
        catch (Exception e) {
            myText.text = $"<b>{e}</b>";
        }
    }
}

If there's a more suitable option than the Google Analytics Plugin for Unity it would be great to know it.

Any help would be greatly appreciated.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Finally I found the error. In google analytics for Unity3D you must have a Universal analytics property (UA-XXXXXXX-1) I always tried it without it and, obviously, it didn't work.

Once you has the object properly initialized in your inspector, you need to create your script to call analytics functions. I don't know if always is needed but I have to call other function in addition to startSession. As the code I pasted in the question I also called a LogScreen and then I started to recieve information in my GoogleAnalytics.

ga.StartSession();
ga.LogScreen("MAIN_SCREEN");

If someone has the same issue I leave here the support page where indicates how get an Universal Analytics property

over 4 years ago · Santiago Trujillo Denunciar
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