Skip to main content
replaced http://sitecore.stackexchange.com/ with https://sitecore.stackexchange.com/
Source Link

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

  2. It looks like you could also query contact info via Search like so:

    using (var context = ContentSearchManager.GetIndex("sitecore_analytics_index").CreateSearchContext()) { var query = context.GetQueryable().Where(c=> c.Firstname.Equals("John")); }

Can we use xDB contact to do a Lookup for usersCan we use xDB contact to do a Lookup for users

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

  2. It looks like you could also query contact info via Search like so:

    using (var context = ContentSearchManager.GetIndex("sitecore_analytics_index").CreateSearchContext()) { var query = context.GetQueryable().Where(c=> c.Firstname.Equals("John")); }

Can we use xDB contact to do a Lookup for users

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

  2. It looks like you could also query contact info via Search like so:

    using (var context = ContentSearchManager.GetIndex("sitecore_analytics_index").CreateSearchContext()) { var query = context.GetQueryable().Where(c=> c.Firstname.Equals("John")); }

Can we use xDB contact to do a Lookup for users

add other options
Source Link
Adam Seabridge
  • 9.4k
  • 1
  • 33
  • 73

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

    Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

  2. It looks like you could also query contact info via Search like so:

    using (var context = ContentSearchManager.GetIndex("sitecore_analytics_index").CreateSearchContext()) { var query = context.GetQueryable().Where(c=> c.Firstname.Equals("John")); }

Can we use xDB contact to do a Lookup for users

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor

  2. It looks like you could also query contact info via Search like so:

    using (var context = ContentSearchManager.GetIndex("sitecore_analytics_index").CreateSearchContext()) { var query = context.GetQueryable().Where(c=> c.Firstname.Equals("John")); }

Can we use xDB contact to do a Lookup for users

Source Link
Adam Seabridge
  • 9.4k
  • 1
  • 33
  • 73

I've not had to do this before but there are a few options available to you by the looks of things.

  1. Use an query against the Mongo DB API similar to this:

    //Connecting to the Analytics DB var driver = Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDriver.FromConnectionString("analytics");

     //Building our query
     var builder = new QueryBuilder();
     var filter = builder.And(builder.GTE(_ => _.StartDateTime, DateTime.Now.AddDays(-30)), builder.EQ(_ => _.SiteName, siteName.ToLower())); 
    
     //Retrieving data from the "Interactions" collection
     var interactions = driver.Interactions.FindAs(filter)
    

http://sitecorepro.blogspot.co.uk/2015/06/starting-with-sitecore-analytics.html or http://www.nttdatasitecore.com/Blog/2016/July/Retrieving-Interactions-Data-from-MongoDB-using-Sitecore-Analytics-API

  1. Use Sitecore Experience Extractor :https://github.com/Sitecore/experience-extractor