简体   繁体   中英

Google analytics, Unity. iOS simulator doesnt send events

I configured Google Analytics with doc provided for Unity 3d ( https://developers.google.com/analytics/devguides/collection/unity/v4/devguide )

Events from Android I can see in runtime, but I dont see events from iOS (simulator).

I choose VERBOSE log level and that is what I got :

Logging event.
UnityEngine.Logger:Log(LogType, Object)
GoogleAnalyticsV4:LogEvent(EventHitBuilder)
***.UIManager:ShowSettingsUI()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

2018-11-27 13:20:20.150445-0800 ***[3859:66026] VERBOSE: GoogleAnalytics 3.13 -[GAIBatchingDispatcher persist:] (GAIBatchingDispatcher.m:517): Saved hit: {
    parameters =     {
        "&_crc" = 0;
        "&_s" = 9;
        "&_u" = ".oyL";
        "&_v" = "mi3.1.3";
        "&a" = 454955775;
        "&aid" = "com.******”;
        "&an" = ***;
        "&av" = "1.0";
        "&cid" = "40c0b3c3-072f-420d-bf6b-e6f2dd513958";
        "&did" = GbOCSs;
        "&dm" = "x86_64";
        "&ds" = app;
        "&ea" = "Show settings ui";
        "&ec" = "UI Actions";
        "&el" = "";
        "&ev" = 1;
        "&sf" = 100;
        "&sr" = 828x1792;
        "&t" = event;
        "&tid" = "UA-128995974-2";
        "&ul" = en;
        "&v" = 1;
        "&z" = 13626212307316188800;
        gaiVersion = "3.13";
    };
    timestamp = "2018-11-27 21:20:20 +0000";
}
2018-11-27 13:20:25.174861-0800 ***3859:66026] VERBOSE: GoogleAnalytics 3.13 -[GAIRequestBuilder requestGetUrl:payload:] (GAIRequestBuilder.m:195): building URLRequest for https://ssl.google-analytics.com/collect
2018-11-27 13:20:25.176054-0800 ***[3859:66026] VERBOSE: GoogleAnalytics 3.13 -[GAIBatchingDispatcher dispatchWithCompletionHandler:] (GAIBatchingDispatcher.m:632): Sending hit(s) GET: https://ssl.google-analytics.com/collect?ea=Show+settings+ui&av=1.0&ul=en&did=GbOCSs&_v=mi3.1.3&an=TapTop&dm=x86_64&a=454955775&el&ec=UI+Actions&_s=9&ds=app&aid=com.***.***&sr=828x1792&ev=1&t=event&tid=UA-128995974-2&v=1&_u=.oyL&sf=100&_crc=0&cid=40c0b3c3-072f-420d-bf6b-e6f2dd513958&ht=1543353620107&qt=5066&z=13626212307316188800
2018-11-27 13:20:25.552976-0800 ***3859:65547] INFO: GoogleAnalytics 3.13 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status -1
2018-11-27 13:20:25.559863-0800 ***[3859:66026] INFO: GoogleAnalytics 3.13 -[GAIBatchingDispatcher deleteHits:] (GAIBatchingDispatcher.m:529): hit(s) Successfully deleted
2018-11-27 13:20:25.586124-0800 ***[3859:66026] INFO: GoogleAnalytics 3.13 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:237): 1 hit(s) sent

I was provided id : UA-1289959**-1, but in GA Unity integration guide's config example were used those values:

Android: UA-XXXXXXXXX-1

iOs: UA-XXXXXXXXX-2

Others: UA-XXXXXXXXX-3

So I used my UA-1289959**-1 with replacing 1 to 2 for iOS (here is my mistake).

Placing UA-1289959**-1 in iOS section made it work.

Hope it will help if someone will face it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM