public void AnonymousIdentification_Creating(Object sender, AnonymousIdentificationEventArgs e) { // Change the anonymous id e.AnonymousID = "mysite.com_Anonymous_User_" + DateTime.Now.Ticks; // Increment count of unique anonymous users Application["UserCount"] = Int32.Parse(Application["UserCount"].ToString()) + 1; }
public void AnonymousIdentification_Creating(object sender, AnonymousIdentificationEventArgs args) { try { if (DataSettings.DatabaseIsInstalled()) { var customerService = EngineContext.Current.Resolve <ICustomerService>(); var customer = customerService.FindGuestCustomerByClientIdent(maxAgeSeconds: 180); if (customer != null) { // We found our anonymous visitor: don't let ASP.NET create a new id. args.AnonymousID = customer.CustomerGuid.ToString(); } } } catch { } }
public void AnonymousIdentification_Creating(object sender, AnonymousIdentificationEventArgs args) { args.AnonymousID = Guid.NewGuid().ToString(); }
public void AnonymousIdentification_Creating(Object sender, AnonymousIdentificationEventArgs e) { // Change the anonymous id e.AnonymousID = "hcc.com_Anon_User_" + DateTime.Now.Ticks; }