public Track ( string userId, string eventName ) : void | ||
userId | string | The visitor's identifier after they log in, or you know /// who they are. |
eventName | string | The event name you are tracking. It is recommended /// that it is in human readable form. For example, "Bought T-Shirt" /// or "Started an exercise" |
리턴 | void |
public static void Main(string[] args) { Console.WriteLine("Started!"); Debugger.Break(); using (Client analytics = new Client("r7bxis28wy")) { analytics.Identify("user123", new Traits() { { "hey", 123 } }); analytics.Track("user123", "Ran away"); analytics.Track("user123", "Engaged a bear", new Properties() { { "bearWeight", 865 } }); analytics.Track("user123", "Engaged a bear", new Options() .SetContext(new Context() { { "app", new Dict() { { "name", "test" } } } })); analytics.Track("user123", "Is Not Alive", new Properties() { { "why", "bear attack" } }, new Options() .SetIntegration("Salesforce", true) ); analytics.Track("user123", "Is Not Alive", new Properties() { { "why", "bear attack" } }, new Options() .SetIntegration("Salesforce", true) .SetAnonymousId("cookie-id") .SetContext(new Context() .Add("ip", "192.144.23.2")) ); analytics.Flush(); } }
public static void Main (string[] args) { Console.WriteLine ("Started!"); Debugger.Break (); using (Client analytics = new Client("r7bxis28wy")) { analytics.Identify ("user123", new Traits () { { "hey", 123 } }); analytics.Track ("user123", "Ran away"); analytics.Track ("user123", "Engaged a bear", new Properties () { { "bearWeight", 865 } }); analytics.Track ("user123", "Engaged a bear", new Options () .SetContext (new Context () { { "app", new Dict() { { "name", "test" } }} })); analytics.Track ("user123", "Is Not Alive", new Properties () { { "why", "bear attack" } }, new Options() .SetIntegration("Salesforce", true) ); analytics.Track ("user123", "Is Not Alive", new Properties () { { "why", "bear attack" } }, new Options() .SetIntegration("Salesforce", true) .SetAnonymousId("cookie-id") .SetContext(new Context() .Add("ip", "192.144.23.2")) ); analytics.Flush (); } }
public static void Track(Client client) { client.Track("user", "Ran .NET test", Properties(), Options()); }