Example #1
0
        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;
        }
Example #2
0
 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 { }
 }
Example #3
0
 public void AnonymousIdentification_Creating(object sender, AnonymousIdentificationEventArgs args)
 {
     args.AnonymousID = Guid.NewGuid().ToString();
 }
Example #4
0
 public void AnonymousIdentification_Creating(Object sender, AnonymousIdentificationEventArgs e)
 {
     // Change the anonymous id
     e.AnonymousID = "hcc.com_Anon_User_" + DateTime.Now.Ticks;
 }