I see a lot of questions about how to start using it, so this is a short post about.
For example let's get all Visits data for the last month (last 30 days) for our particular site. First of all we need to get the MongoDB collection named "Interactions" it has all Visits data:
In similar way you can get other data.
For example let's get all Visits data for the last month (last 30 days) for our particular site. First of all we need to get the MongoDB collection named "Interactions" it has all Visits data:
//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)
In similar way you can get other data.
Its nice to look into your valuable thoughts.I am very much inspired by your blog.So I look forward to see some more updates on your site.
ReplyDeleteHire Mean Stack Developer
We are also pulling the data in the way you have mentioned. I am currently struggling with syntax. Can you please check if you can help me with this question http://stackoverflow.com/questions/41566104/issue-with-querying-data-from-mongo-for-nested-elements
ReplyDeletewht a blog kha bathke
ReplyDeletePHP Training in Chennai | Certification | Online Training Course | Machine Learning Training in Chennai | Certification | Online Training Course | iOT Training in Chennai | Certification | Online Training Course | Blockchain Training in Chennai | Certification | Online Training Course | Open Stack Training in Chennai |
Certification | Online Training Course
hanks for sharing amazing information.Gain the knowledge and hands-on experience
ReplyDeleteMongodb Training in Bangalore
Thanks for Share Such a Awesome Article about Sitecore Training
ReplyDeletenice information I found some MongoDB interview questions that s good for MongoDB courses For skilled and creative IT professionals
ReplyDeleteI've been looking for the right AWS course to kickstart my cloud journey, and your blog post has helped me narrow down my options. The insights on course content and certification pathways are invaluable. Please visit our website:- aws course
ReplyDelete