Hello! Good day! Was just wondering for sending da...
# support
a
Hello! Good day! Was just wondering for sending data through Unity. It seems I am not receiving or seeing any passing events in the Event tab on rudderstack. May I ask for some help on how to troubleshoot this?
q
What do you see in live events? Here is a doc to get started with Unity https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-unity-sdk/
a
I do not see anything on the live events
q
Can you share the code snippet used for collecting the events
and email associated with your workspace
a
Got it. will send right now
using System.Collections; using System.Collections.Generic; using UnityEngine; using RudderStack; public class AnalyticsAPI : MonoBehaviour { private void Awake() { // Critical for iOS Applications where multiple components are using SQLite // This has no effect for Android, but can be added as a safety check RudderClient.SerializeSqlite(); // And then initialize the sdk in the Awake method of your main GameObject Script RudderConfig config = new RudderConfigBuilder() .WithDataPlaneUrl("https://proximaxjljo.dataplane.rudderstack.com") .Build(); RudderConfigBuilder configBuilder = new RudderConfigBuilder() .WithDataPlaneUrl("https://proximaxjljo.dataplane.rudderstack.com") .WithLogLevel(RudderLogLevel.VERBOSE); // get instance for RudderClient RudderClient rudderClient = RudderClient.GetInstance("2OXZWfksbLO5V7jJqWhJb41Tk3z", config); configBuilder.Build(); RudderMessage identifyMessage = new RudderMessageBuilder().Build(); RudderTraits traits = new RudderTraits(); //pre-defined API's for inserting standard traits traits.PutEmail("alex@example.com"); traits.PutAge("40"); //Put API to insert custom traits traits.Put("location", "New Orleans"); traits.Put("gender", "Male"); traits.Put("consent", "Granted"); rudderClient.Identify("some_user_id", traits, identifyMessage); // create event properties Dictionary<string, object> eventProperties = new Dictionary<string, object>(); eventProperties.Add("test_key_1", "test_value_1"); eventProperties.Add("test_key_2", "test_value_2"); // create user properties Dictionary<string, object> userProperties = new Dictionary<string, object>(); userProperties.Add("test_u_key_1", "test_u_value_1"); userProperties.Add("test_u_key_2", "test_u_value_2"); // create message to track RudderMessageBuilder builder = new RudderMessageBuilder(); builder.WithEventName("test_event_name"); builder.WithEventProperties(eventProperties); builder.WithUserProperties(userProperties); rudderClient.Track(builder.Build()); } }
k
Hey @ambitious-winter-46159, On which platform where you running your application and where you seeing any logs ? CC <!subteam^S04QT1G74Q3|@sdk-team>
a
I am running it on Unity
but once we build it it would be on web
Though upon testing it within unity it is providing feedback on the console
but no feedback within the events dashboard
k
As of now our Unity SDK supports only Android and iOS platforms, so that is the reason why you are not seeing events flowing to Rudderstack
a
Even when its sent to GA4?