Friday, November 9, 2018

Track your Internal Search Keywords Using Sitecore Analytics




In the Digital ERA, everything is now measurable, Everybody wants to know their customer behavior on the website and keyword search is the most important element in this aspect to know what exactly customer is searching or looking on the website, through tracking these keywords information, marketers can further optimize the pages/visuals/lead/forms/Sitemap/personalization’s/ rules etc.  To provide better customer experience and get more conversions.


Again, “Internal Search” feature is the hidden gems feature in the Sitecore analytics, Must say Sitecore cares the current digital marketers and provides such a “must have” feature in the Sitecore analytics out of the box.

I didn’t know this feature, and wanted the track all the keyword search on my website, to check “what exactly people are searching on my website”
But the question is how? How to track all the keyword of the website search that customers are searching? Do I need to store in the database? And do some basic reporting, or track all the pages with query string? and provide the unique report? Was totally confused and planning to build my custom module for the same.

But after scratching my head a bit and some googling , I came to know the feature called “Internal Search” in the Sitecore out of the box. Cool, then why should I reinventing the wheel, if  Sitecore has already invested and provided as a feature.

But the problem was how to configure this search tracking functionality in the analytics, by default it’s not implemented and showing blank as below.



Then again after doing some research I figured out the solution, and now I can track my keyword search and here is the results:

But….

Guess, who is the most searchable person by the Sitecore community members on my website?



 Yes, Akshay Sura and Kamruz Jaman are the top keyword search on my website, see how important this feature is? Now I can track my keywords search like anything – Real time..


 




Solution – How to configure the Internal Search keywords tracking in Sitecore Analytics:

For the demo purpose, I just created a simple search.aspx page which consists of textbox and button,






I am searching the keywords using the above textbox and click on the search me button, then I am calling sitecore analytics API to register the keyword.

 Register the search page event in the Sitecore Aanalytics tracker


        protected void Button1_Click(object sender, EventArgs e)
        {
           
            var searchEvent = Tracker.MarketingDefinitions.PageEvents[AnalyticsIds.SearchEvent.Guid];
            string searchKeyword = string.Empty;
            searchKeyword = TextBox1.Text.Trim();
            Sitecore.Analytics.Tracker.Current.CurrentPage.Register(new PageEventData(searchEvent.Alias, searchEvent.Id)
            {
                Data = searchKeyword, Text = searchKeyword
            });

        }

here is the form page, don’t forget to add visitor identification tag on the page:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="Search.Search" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            Enter Search Keyword :
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

            <asp:Button ID="Button1" runat="server" Text="Search Me" OnClick="Button1_Click" />

        </div>
    </form>
    <sc:VisitorIdentification runat='server'/>
</body>
</html>

Here is the code behind:


using Sitecore.Analytics;
using Sitecore.Analytics.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Search
{
    public partial class Search : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
           
            var searchEvent = Tracker.MarketingDefinitions.PageEvents[AnalyticsIds.SearchEvent.Guid];
            string searchKeyword = string.Empty;
            searchKeyword = TextBox1.Text.Trim();
            Sitecore.Analytics.Tracker.Current.CurrentPage.Register(new PageEventData(searchEvent.Alias, searchEvent.Id)
            {
                Data = searchKeyword, Text = searchKeyword
            });

        }
    }
}

Really cool and quick to start the POC and implement the above code based on your solution and code:

Now, deploy your page into your Sitecore instance and hot the search page URL something like http://suguae.sc/search.aspx in your case, replace your domain name:

Search some keywords and hit search button and behind Sitecore will track all the keywords which you are searching.

Change the session timeout setting from the web.config to quickly test the functionality otherwise you have to wait 30 minutes to refresh the results,

<sessionState mode="InProc" cookieless="false" timeout="1" sessionIDManagerType="Sitecore.SessionManagement.ConditionalSessionIdManager">      <providers>      

Now all done, let’s check the Analytics:

Go to the analytics dashboard: 




Go to internal search under Behavior tag on the left hand side panel




Now you can able to see all your keyword tracking based on your search page here, also you can generate multiple reports based on multiple Metric – Page view, counts, Visits etc. further you can filter the date based report using time range etc..




I found this feature very important and relevant, and everything is built-in with minimum code change.

I hope you like this article  will help you to start thinking and exploring the Keyword search with Sitecore.

Happy Sitecoring..  

Sunday, October 28, 2018

My Sitecore Symposium 2018 Take Away:




It’s been an amazing journey with Sitecore(almost 11 years) so far, and recently I got the opportunity to attend Sitecore Symposium this year In Orlando, FL, USA.

Some basic facts of this symposium:

  • Over 1,000 brands are at Symposium
  • 3,000 attendees from 53 countries
  • 5 breakout tracks with 100 sessions
  • Partner pavilion with 50 sponsors
  • 15,000 certified Sitecore developers
  • Sitecore delivers 200 million digital experiences per year




·

My Journey started from Dubai to Orlando, its 16 hours non-stop flight, Yes 16 Hours..  but everything is fair in Sitecore Love n WAR , so I don’t had any regret to flown that long..





The very first keynote started with customer experience –




   
“Mark CEO of Sitecore started with “How Experience is important in the Era of digital world, everbody expecting the experience not the just product” Experience is everywhere.. and that’s how  Sitecore can come into the picture and provide the real customer experience”

“Sitecore delivers 200 million digital experience in a year” 





3 Main  Pillar of New Sitecore Release – 9.1




Empower Developers through JSS





Personalization:



Sitecore and Salesforce:



Big Announcement = Sitecore+ StyleLabs




Daymond John – Keynote Speaker:




 360 – Degree of Content and Customer:




Sitecore Focus -  Next 12 Months



Thanks for Jake Johannsen for entertaining us all the time on the stage:





Tuesday, October 2, 2018

Sitecore 9 EXM Guide: Part 4 - Optimize your Multi-Lingual Email with Sitecore EXM Preferred language Functionality






This series is divided into four parts:

Sitecore 9 EXM Guide: Part 1 – How to Setup Sitecore 9 EXM in 5 Minutes
Sitecore 9 EXM Guide: Part 2 – Explore Sitecore 9 EXM Reporting
Sitecore 9 EXM Guide: Part 3 – Personalize Your Emails with Sitecore EXM Tokens



Think about the international audience and their Native language:

Research proved that user spends more time on email communication and web content if its written in their native language and chances of conversion might be double for those native language speakers if you send the communication in their native language.

And 2x is a game changer figure for big email campaign, so planning of the multi-linguage campaign is very important if your audience is multi-national/lingual.

Step By Step – Plan your email campaign in multi-lingual with Sitecore EXM

Build your customer segment based on language preference, and tag every customer with preferred language column and fill their native/preferred language.

I am going to create three below languages for my email campaign as below:

  • Arabic
  • English
  • Spanish




I am assuming we have done this task offline and prepare the offline CSV file with below attributes of the email contacts:

  •        First name
  •        Last name
  •        Email address
  •        Preferred language


The file will look like this:



I created 12 contacts with different preferred language which are English, Arabic and Spanish, here in the file we need to upload the language code.

Create the Languages in the Sitecore:

Go to System > languages > create Arabic and Spanish language >



Once you done with the language, the next step is to map the preferred language field with the imported contacts.

But the question is how? As Sitecore provided the functionality of sending the email based on preferred language



How to set User preferred language for each recipient?

So, we already have the data ready the only thing is to map the data with existing facet of the contact.

When we upload the CSV file, Sitecore in background creates the contact for each recipient and by default map only three facets as below:

  • First name
  • Last name
  • Email

Now, we have to map the fourth facet called prefrredlangauge/
So, follow the below steps to map the preferred language:

Go to the desktop:



Change the database from master to core




Navigate to > /sitecore/client/Applications/List Manager/Dialogs/ImportWizardDialog/PageSettings/TabControl Parameters/Map/ImportModel

Here is the list of all default item derived from /ImportModelField template
Duplicate any item and change the data as below:


Change the duplicate item(Personal – preferred language” fields value as below:


  
Now all done from mapping side, lets quickly create one email campaign with three language version and based on the individual preference of the email list, Sitecore will pick the correct language version and send the email accordingly

Creating Multi-Lingual campaign with EXM

Go to EXM > create the Regular email campaign >

Select > simple html message > First_Campaign_Multi_lingual




Go to receipts tab > click on dropdown  > Add list from File > select the CSV file which we created in this blog>



Upload the list >



Go to Map Tab>

Great, I can see the new mapping field called “Preferred Language” which we just configured in the above steps:



Select all the File field with Sitecore field as above image,

12 contact has been imported in the Sitecore from CSV file:



Quickly I created the sample English message as below:



Now time to create the Arabic and Spanish version of the email:

Change the language > Arabic from language selector >

Enter the Arabic message template, here I entered the sample arabic content the below:



Same like Arabic, I created the Spanish version of the email, by selecting Spanish language from the language selector as below:




Now we have created all three version of the email, time to send the email message with multi-language functionality

  • Go to delivery tab >
  • Select the Multi- language > select the checkbox > Use preferred language >
  • Important Note: make sure you select the English language from language selector at the time of clicking the send message button, otherwise the selected language email version will send for all the recipients regardless of preferred language. 
  • Click on send email option




Now check the email, I am checking three emails for English, Arabic and Spanish

As per my file record, below would be the preferred language data based on email:



Here is the result:

Jack Daniel – Arabic Speaker:



Sachin Tendulkar – English



Virat Kohli – Spanish:


Hope this Article will help You

Happy Sitecoring..

Track your Internal Search Keywords Using Sitecore Analytics

In the Digital ERA, everything is now measurable, Everybody wants to know their customer behavior on the website and keyword search...