googleanalytics / google-analytics-plugin-for-unity

Google Analytics plugin for the Unity game creation system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GAv4 not sending hits

Marcus5234 opened this issue · comments

I followed these instructions, I'm trying to make GAv4 work in the editor, but I don't get any data in the real time overview. However, in the unity console it says "Successfully sent Goggle Analytics hit". I did put the tracking on all fields, "Android Tracking Code", "IOS Tracking Code" and "Other Tracking Code". Please help!

commented

Running into this too. I've tried a few things with no success:

  1. If you enable verbose logging and copy the generated URL into Postman or cURL, I see 1 realtime user in the analytics dashboard. From this I deduce that Analytics seems to be configured correctly.
  2. I have replaced the WWW code in GoogleAnalyticsMPV3.cs:
//GoogleAnalyticsV4.getInstance().StartCoroutine(this.HandleWWW(new WWW(newUrl)));
GoogleAnalyticsV4.getInstance().StartCoroutine(GetRequest(newUrl));

And added this very generic handler to the class as well:

IEnumerator GetRequest(string uri)
{
  UnityWebRequest uwr = UnityWebRequest.Get(uri);
  yield return uwr.Send();
  if (uwr.isError)
  {
      Debug.Log("Error While Sending: " + uwr.error);
  }
  else
  {
      Debug.Log("Received: " + uwr.downloadHandler.text);
  }
}

Using this method to fire off the requests, I am still seeing no activity in google analytics.

  1. I tried replacing this call with a call to a generic https resource just in case this had something to do with the issue, but this was not a factor and that resource was downloaded successfully

^ All of the above scenarios were attempted from within the Unity Editor

I though GoogleAnalyticsV4 was obsolete and now using the Firebase.Analytics.FirebaseAnalytics.LogEvent(category, label, value); ??
I removed all my previous GoogleAnalyticsV4 integration since the Analytic interface for to Firebase if you log a new iOS/Android app...