Monday, 27 June 2016

Sitecore SubItem Count Module

The best part of Sitecore CMS is its flexible architecture. You can hook your code anywhere to fulfill your requirement.

One such small but very useful customization I did for our content author team recently. I believe content authors are one of the real stakeholders of Sitecore CMS who use your developed functionality almost every day. In order to improve content authors' efficiency, I implemented "SubItem Count" functionality which will show "Child Count" of content tree items in gutter as shown in below figure.

Sitecore SubItem Count module will help your content authors to know the number of subitem for each item in content tree.

It will help you to know two things:

1) Immediate Child Count
2) Descendant Count

The SubItem Count can be made visible and invisible by right clicking on gutter area in Sitecore Content Tree.

How to get this module?

This is my forth Sitecore Module contributed to community. You can download this module from Sitecore Marketplace.

How to contribute to this module?

In case if you want to customize this functionality further, then you can download and contribute code at GitHub. Thanks to my friend Ashish Bansal for contributing to this module.

What is inside this module?

As mentioned earlier, this is very simple and small module which contains below Sitecore item and DLL.

1) Assembly File:

2) Sitecore core database item:
    /core/sitecore/content/Applications/Content Editor/Gutters/SubItem Count

Hope your content author will like it!

Wednesday, 15 June 2016

How To Convince Your Client For Sitecore 8+ Upgrade?

Are you Sitecore developer?
Hearing a lot about Sitecore 8 but still working on older version like 7?
Do you want to upgrade your project on Sitecore 8 but don't know how to convince your client?

Being a developer you will always like to work on latest version of Sitecore but we are struggling to showcase business benefit to client why we should move to latest version.

If you are surrounded with above questions, then convince your client by demonstrating below business benefits that you will get after upgrade to Sitecore 8+.

Before you start reading this post, I would like to mention that the content of this post is borrowed from Internet and idea behind writing this post is to list down all Sitecore 8.0 eye catching features at one place. This post is one stop solution that will help you to win Sitecore 8 upgrade project. Thanks to Sitecore community for posting all these features.

Why Sitecore Customer Experience Platform 8?

As a leader in the world of customer experience management, new and exciting updates to Sitecore’s features and functionality are always hotly anticipated. None more so than Sitecore 8, which sees the platform step up its capabilities even further than before.

This compiled document will explore some of the most important and exciting features that have been introduced from Sitecore 8 onwards.

A whole new user friendly look

The Sitecore® Experience Platform™ 8.1 CMS has a completely new user interface compared with earlier Sitecore.

The look and feel of the client is much improved. After the initial load, performance feels much quicker than Sitecore 7.5 and previous versions. The Launch Pad icon at the top of the page comes in very handy when wanting to switch between the new Sitecore 8 components and content editing, or experience editing; features that you’re already used to using in pre-8 installations.

Moving through the various steps of editing content, publishing, workflow, etc. match that of previous versions — just in a different layout. Everything is pretty much where you would expect it, but with a cleaner look and feel.

Continuous testing and optimization

With Sitecore XP 8.1, everything can be optimized easily—test an entire page, a component, or specific personalization element. All changes can be automatically A/B tested, by any content creator, and Sitecore’s analytics will attempt to find additional optimizations automatically. Advanced optimization experts also have all the tools they need to set up sophisticated test scenarios, like multi-variate tests, built into the platform. So every component and every channel can be fine-tuned for performance, continuously.


When moving content changes through Workflow, new “Approve with Test” and “Approve without Test” are available, consistently reminding content editors and decision makers to consider A/B testing at a content level.

Email Experience Manager

The layout of the email campaign manager has changed, allowing for message creation and list importing available from the same menu

Know Your Customers Better - Experience Analytics

New to Sitecore 8, the Experience Analytics feature brings together multivariate testing results, engagement scoring and overall site tracking statistics together in one location. The result is a powerful, new array of reports coupled with date range filtering and reporting facets.

Path Analyzer

One of the new features I’ve had the most fun with so far is the Path Analyzer. Clicking on the map, zooming in and out, selecting successful and least effective paths is really quite fun. The example below is leveraging Analytics data collected from a Launch Sitecore instance:

Selecting a path by clicking on the map, leading from a mail campaign to a login page yields the results below. Clicking on an element within the funnel of a selected path visit shows the exit path from that particular page:

You can also select a path from the lists in the right navigation, narrowing down on a particular path of high importance. For instance, the selected path below is one of the most efficient full paths:

Showing the funnels of the select path:

Fully integrated Device Detection features

The Sitecore Device Detection service uses a visitors’ browser user agent string to identify that visitors’ device and extract the device properties (such as device model, browser, device operating system, screen size, HTML5 audio and video capabilities). The service supports the Experience Database (xDB) and Experience Analytics, allowing content authors to pull reports based on visitors’ device and device usage, then enabling them to optimize and personalize these visitors’ website experiences – specific to their device and its properties. For example, an optimized visitor experience could include a mobile-friendly layout (through adaptive or responsive web design) as well as a personalized experience through promotions designed for a visitor using an Apple iPhone.

**The Sitecore IP Geolocation service will be available via a subscription in the Sitecore App Center.

Fully integrated IP Geolocation features

The Sitecore IP Geolocation service uses website visitors’ unique IP addresses to automatically populate the Sitecore xDB with location details, for example, country, region and city, when they visit a Sitecore-powered website. Depending on the IP address, company information is also sometimes available. This information helps personalize customers’ experiences and optimize their campaigns through segmentation, personalization and profiling strategies.

**The Sitecore IP Geolocation service will be available via a subscription in the Sitecore App Center.


Social is delivered out of the box with Sitecore 8. Previously, this required a separate installation of the Socially Connected module from SDN.

Available from the Page Editor, the “Messages” button under “Social” allowing content editors to create, edit and post a message on a target network. Take note of the new “Social” node in the content tree directly under the Sitecore root node.

One view of your customer

The Sitecore® Experience Profile™ provides a single view of each individual customer, used for real-time personalization, segmentation, and analytics. Sitecore collects and connects data about the whole customer experience, wherever it happens, making it immediately available to marketers to continue ongoing conversations and provide highly relevant and contextualized experiences for their customers.

Integrated content and commerce

Sitecore XP 8.1’s Sitecore Commerce add-on integrates content and commerce, so your customers’ online shopping journey is seamless and, because it uses all the data in the Experience Platform, you can personalize offers throughout that journey. However, Sitecore can also integrate with your existing Commerce software to deliver similar capability, helping you improve the ROI on your existing technology investments.

Federated Experience Manager (FXM)

This adds the power of Sitecore to non-Sitecore sites.

There are two benefits: Firstly, it adds content syndication, personalization, MVT testing to external sites, and secondly, it adds tracking facilities and insight from these back into DMS from these external, non-Sitecore sites thus enriching the data insight and personalization.

What If You Don’t Upgrade?

Sometimes, upgrading isn’t necessary and choosing to stay-the-course is the most intelligent move. There are, however, some points to consider before making a decision.

Infrastructure – Sitecore is an ASP.NET application and thus relies on the entire Windows family of services to run. If the fundamental components of a Sitecore version are outdated, the entire system can become unreliable. For example, if a security exploit is found in SQL server that is patched in later releases, it may cost a company more for not upgrading than it would have to simply upgrade originally.

Bugs – Each new version of Sitecore fixes bugs from previous versions. While many go unnoticed, they could be affecting the user experience or site performance.

Sitecore Support – Like any product, Sitecore will eventually drop support of older versions. A support lifetime matrix is available to view when support for each version ends.

Marketing – Ultimately, a corporate website is a marketing tool. By not upgrading, your site objectives – lead generation, nurturing, thought leadership and recruiting – could take a hit.

Thanks to all Sitecore community members to help me to create this consolidated feature list!

Wednesday, 8 June 2016

Live Streaming And Tracking Tweets in .NET

When you google "live streaming tweets" or "real time tweet tracking", you will find loads of APIs those will help you to achieve your task.

Now you will be thinking then why I am writing this post?

Well, there are main two reasons behind it.

1) Since you will find that there are many APIs available in market, which API should you use? How to get started? This blog post will help you on this by putting all things together. It will cover everything from soups to nuts to track live tweets.

2) Most importantly, how to real time track twitter emoji? To cover this point, it's prerequisite to understand first point (e.g how to track tweets real time). We will discuss this second point in my upcoming blog post.

So let's first see how to track tweets real time. Tweetinvi is the best API/Library I have found which has wide range of features to track tweets. As all the features and events of Tweetinvi is very well documented, I am not going to discuss it and rather I will focus on how to get started using it.

1) How to Get Started?

Here is the step by step process to get started with Tweetinvi.

Step-1: Install Tweetinvi NuGet

Tweetinvi is an intuitive .NET C# library to access the Twitter REST API. To install Tweetinvi, run the following command in the Package Manager Console

PM> Install-Package TweetinviAPI

Step-2: Write a code to connect with Twitter

Step-3: Write a code to track tweets based on keyword real-time

You can track tweets based on many criteria such as Geo-Location, Followers and many more. Refer Tweetinvi's official documentation on GitHub for the same.

For example: Write a code to track tweets based on Geo-Location real-time
Below code tracks all live tweets happening at Dubai.

Here is the complete code
static void Main(string[] args)
            Auth.SetUserCredentials("key1", "key2", "key4", "key5");
            using (var webClient = new WebClient())
                webClient.Proxy = WebRequest.DefaultWebProxy;
                webClient.Credentials = System.Net.CredentialCache.DefaultCredentials; ;
                webClient.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
                webClient.Headers["User-Agent"] = "MOZILLA/5.0 (WINDOWS NT 6.1; WOW64) APPLEWEBKIT/537.1 (KHTML, LIKE GECKO) CHROME/21.0.1180.75 SAFARI/537.1";

                var creds = new TwitterCredentials("key1", "key2", "key3", "key4");

                var stream = Stream.CreateFilteredStream();                                
                stream.MatchingTweetReceived += (sender, a) =>

                var StreamThread = new Thread(() => stream.StartStreamMatchingAnyCondition());

Step-4: See the result!

Running above code snippet will start live streaming of tweets having keyword "Technology" shown in below screen.

This was the just half journey completed for me.
Remember point-2?  How to real time track twitter emoji?

I still need to find a way to track tweets based on emoji icons. Neither Tweetinvi API nor Twitter API provides a direct way to track twitter emoji. This was a challenge for me and finally I was able to crack it. We will see how to track twitter emoji real time in upcoming post.

2) How to real time track twitter emoji

Check it out at Part-2 blog post.