Friday, August 28, 2015

Tracking Google AdWords performance and value in Sitecore

Google AdWords are a great way of driving targeted visitors to your web site. However as there is a direct monetary cost on acquiring this traffic, you want to ensure you are getting the best value for money. Using the Experience Analytics and Marketing features in Sitecore are a great way of tracking the performance of various Google AdWords keyword campaigns.

Step 1: Sitecore Campaign

The first step is to create a Sitecore campaign for your AdWords campaign. Depending on the amount of parallel campaigns you are running on AdWords you could create one campaign per keyword or one per group of relevant keywords. To create a campaign in Sitecore:
  1. Login to Sitecore
  2. Open the Marketing Control Panel
  3. On the content tree select Campaigns and then right click Insert > Campaign
  4. Give the campaign a relevant name, in this example "Test Campaign"
    1. For the channel select Google ads (under: Channel/Online/Paid Search/)
    2. If you have a custom campaign group (such as Paid Advertising) you can select it
    3. Take note of the campaign link (something like: sc_camp=686A5C84924C40A188204A4999A03119)
    4. Save the campaign
  5. On the main ribbon, select Edit and then Deploy to make the campaign active
  6. Now in Google AdWords set the relevant campaign(s) links to include the campaign link as query string. For example: http://mysite.com/LandingPage.aspx?sc_camp=686A5C84924C40A188204A4999A03119
  7. This campaign will now begin tracking in the Sitecore Experience Analytics database

Step 2: Measuring Results

There are a number of ways to measure the results of your Google AdWords campaigns in sitecore. There is no best method to measure the results for every web site, because different web sites will have different strategic goals. However any of the following Sitecore Experience Analytic features should give an indication as to the performance.


  • Top campaign by visits - Shows which campaigns are receiving the most traffic. Of course this is relative to the number of impressions the ad receives in Google search results.
  • Top campaigns by value per visit - This is generally a good measure, because it shows which campaigns are leading to the most Engagement Value per visit. Assuming the Engagement Values have been optimized and planned carefully, this will directly show which Google AdWords are the "best performing".
  • Top campaigns by bounces - A high bounce rate can identify content/landing pages which are not relevant to the keywords coming in and which may be due for optimization.
  • Data Table: This is where the real data becomes apparent for all of your campaigns:
    • Conversion rate shows the average percentage of conversions to a web sites goal(s). Ideally you place goals on activities which relate to/are your web site's strategic goal, so a higher conversion rate is idea.
    • Page views per visit show a general indication of how engaged the user is. A higher number of page views per visit can show a very interested user (and should correlate with a higher value visit), where as a low number of pages per visit may be a sign of less interested visitors (and a sign to look at content optimization or pulling the AdWords campaign).

The use of campaign groups is also a great way to compare the various sources (such as Google AdWords) versus other networks to see which leads to better performance and value. Depending on the type of web site and it's strategic goal(s), various advertising sources may perform better than others. For example, for a highly technical web site, advertising on the technical help site Stack Overflow may have better results than Facebook ads. Likewise you may also find that email campaign mail outs are having better results than Google AdWords and choose to focus more in that direction.

Step 3: Optimization

Now that you have some idea around the performance of your Google AdWords campaigns in Sitecore, there are some activities that can be undertaken to optimize them. These are just some general notes on how you can optimize and will not be complete step by step instructions.
  • Personalization - The rule set editor in Sitecore allows personalisation on a number of conditions including campaigns. By personalizing the web site based on a campaign (in turn the Google AdWord) you are able to optimize the experience for that particular targeted keyword. This allows content to be setup in a way to drive users into completing strategic goal(s) and even other goals targeted to a particular set of keywords. For example if the web site is an online store and the AdWord is in relation to a particular product line, the content could be personalized with emphasis put on this product line - ultimately leading to more sales (the main strategic goal) and therefore higher Engagement Value.
  • A/B + Multivariate Testing - A/B multivariate testing can be used on landing pages for Google AdWords campaigns to test what various elements lead to better results (any of the measures above). Sitecore is ideal for this type of testing, whether it be as simple as testing the words of a call to action, right down to multivariate of content, style and layout.

Sitecore Engagement Value a measure of success

In the past simple measures such as the number of hits, sales/leads generated, and simply traffic sources would be used as analytical data to judge the success of a web site. Sitecore is the market leading CMS and is packed full of analytical data inside it's Experience Analytics and Experience Profiles. Furthermore the marketing capabilities allow content authors and marketers to optimize the entire experience for users (across all channels - including web, mobile, social and even print). One interesting feature available out of the box in the Sitecore arsenal is: Engagement Value.

Strategic Objectives

A web site should have a strategic objective which it is trying to achieve with every user. For example an online store may have a strategic objective to make a sale, whereas a service based web site may have a strategic objective to generate a qualified lead. This strategic object is then what drives and determines the engagement values across the web site.

For the strategic objective of generating a qualified lead, a goal around completing a callback form would be given a high value (100 points for example) as this shows the user is highly interested in that service, where as a goal around downloading a brochure file would have less of a value because while it shows engagement and interest, it's not the highest valued goal.

If you set high values on less than ideal goals (such as simply downloading a brochure, versus completing the callback form) you are then likely to begin optimizing the site for downloading the brochure rather then completing the callback form. Each goal or action that aids in meeting the strategic objective is worth some engagement value, it then becomes a balancing act to apply the correcting value to each so that you optimize for the correct goals, and also not missing any items out which can aid in meeting the strategic objective.

An example of some engagement values for a service based organisation with a strategic objective of generating a qualified lead could look like:

Value Goal
100 Complete the callback form
60 Signup for a demonstration
30 Get an online quote
10 Signup for a mailing list
5 Download a case study brochure

Assigning Engagement Value

When you create a goal in Sitecore, there is a field (defaults to 0) which allows you to specify the points for that goal. It's these points which are the Engagement Values.

Viewing the results of Engagement Value - The measure of success

Throughout the Experience Analytics section in Sitecore, the average values are shown in the data tables.

The example above shows the top exit pages for the web site, it it the value is visible. By looking at the top exit pages, and the corresponding value, you are able to see where low value visitors are exiting the site and can make optimizations based on that.


In the example above, the value is shown for the marketing campaigns. In this case the email campaign had better results than Facebook (based on both value and time spent on site). These campaigns would have a monitory cost, so figuring out which ones provide the best value for money is important.

These are just a couple examples of the usefulness of engagement value in Sitecore. When it comes to search keywords (paid and unpaid), A/B + Multivariate testing and even personalisation you can use engagement value as a measure of their success.

The real benefit here is that you are not only optimizing on a single goal (such as a sale or callback form submission), but a whole set of goals that all contribute to the strategic objective of the web site. Sure, the main goal (which is likely making the sale) will be worth the most engagement value, however the other goals are still valuable (albeit not so much). With Sitecore Engagement Value you optimize for the full picture and all items that contribute to the strategic goal, ultimately this will lead to more success.

Wednesday, August 26, 2015

Redirecting HTTP to HTTPS on IIS

It can be beneficial for security and SEO reasons to secure an entire web site, rather than pages were there are login forms and other private data. The myths around performance hits have been debunked, and the main potential downside is around third party ad networks (and many sites don't display ads like this anyway).

To achieve redirection from non secure to secure URLs on an IIS web site, the URL Rewrite Module will need to be installed on the server. Then the following XML will need to be added into the web.config (site root) inside the system.webserver section.

Now URLs such as http://example.com/page.aspx will redirect to https://example.com/page.aspx.


Do you prefer site-wide SSL or simpl on select areas/pages? Discuss in the comments below.

Tuesday, August 11, 2015

Sitecore triggering a goal programatically

Goals are simple to setup to be trigger on Sitecore items, however there are times where goals may need to be triggered in the code. This is generally the case where the goal is triggered based on some business logic, and in these cases the following code can be used. Please note: This code is for version 8 onward, there are some older methods which are no longer used.

The code above accesses the goal item in Sitecore via GUID (don't forget to publish!) and then registers it to the current page - also using the goals description as extra information.

On the goal item in Sitecore, you are also able to set if the goal is shown in events/latest events in the Experience Profile (a custom image can also be defined here).


This then means that the goal will show inside of the Experience Profile, which is great for a complete overview on site users.


Sitecore using custom SMTP for the Email Experience Manager

For the sending of email from the Email Experience Manager in Sitecore, the default option is to use the Sitecore Message Transfer Agent (MTA), which is a paid service available in the App Center. However it is possible to purchase the right to use a custom MTA, aka the UseLocalMTA setting. Development/Testing licenses are likely to already have this option enabled, it is the prod licenses that are likely to require a payment.

It is worth noting, that it's not recommended to use the SMTP details of the clients main domain (where there business email comes from), as there may be consequences in terms of spam and trust levels of the server. Therefore the Sitecore MTA or another custom email provider is recommended for the Email Experience Manager.

Using a custom SMTP server

  1. Open the Sitecore.EmailExperience.ContentManagement.config file which can be found in Website\App_Config\Include\EmailExperience
  2. Set the UseLocalMTA setting to true
  3. Set the SMTP settings to that of the SMTP server
    1. SMTP.Server - server URL or IP
    2. SMTP.Port - port (usually 25)
    3. SMTP.LoginDomain - login domain may be required if on internal network
    4. SMTP.UserName - username
    5. SMTP.Password - password
    6. SMTP.AuthMethod - authentication method (default of NONE should work)
There are also proxy settings available, if the server is on a network where proxies are required for security reasons.

As of Email Experience Manager 3.1

Monday, August 10, 2015

Installing the Sitecore Email Experience Manager

Introduction

The Sitecore Email Experience Manager (or EXM) is a free module provided for Sitecore, which can be harnessed not only for simple emails, but marketing activities. With the advanced marketing capabilities available today, it's no longer best practice to blast a stale and static email to every user, hoping for high conversions and low subscriptions. Sitecore EXM brings a number of key features to the table. which include:
  • Team collaboration - Creating the emails themselves and even the landing pages is a collaborative effort with everyone working together using the same workflows and assets to deliver a consistent end product.
  • Automated emails - Sitecore allows emails to be triggered on events, behaviors and any of the other customer experience data. You may use this to send a welcome email upon registration, a confirmation email upon submitting a form/request or perhaps even a happy birthday message on the users birthday.
  • A/B + multivariate testing - Test whether or not factors such as subject, formatting, media and even timing to see what variables deliver the highest conversion rates.
  • Personalization - Sitecore is collecting data on each user which can then be used to send relevant emails to your users. By sending the right information the users will appreciate the email more and are less likely in unsubscribe and more likely to follow through with a call to action.

Installing Sitecore Email Experience Manager

The first step is to download the correct EXM package from your Sitecore version from the Sitecore Developer Portal. This is not be be confused with the Sitecore Campaign Manager (for pre-version 8) available on the Sitecore SDN. Also please note that this download itself is not the sitecore package.
  1. Extract the download and find the package.zip file - this is the Sitecore package
  2. Login to your Sitecore instance's administration desktop. Then click Control Panel > Administration > Install a package
  3. Upload the package and then click Next and Upload
  4. After the upload is complete click Next to start the installation
  5. Read and accept the license agreement, the click Next
  6. Make a copy of the installation notes and click Next
  7. The package details will now show, you can click Install
  8. Once complete, you should restart the Sitecore client
If you use multiple server for content delivery, analytics, and email processing for example, there are some deployments that will need to be made to those servers. These files are included in the file downloaded from the Sitecore dev portal (they are not packages that need to be installed).

Once installed the following steps from the installation notes need to be followed:

  1. Attach the Sitecore.Exm database. The file can be located in the Data folder.
  2. Add the connection string "exm.dispatch" (the SQL Server connection string) to /App_Config/ConnectionStrings.config
  3. Run Sitecore.EmailExperienceManager.sql for the reporting database (Analytics) of your instance. The file is available at Data folder.
  4. Publish your site using smart publish. 
  5. In the App Center, configure the Email Delivery service. - This is the paid MTA service
The Sitecore Email Experience Manager is now installed and ready to use. On the first load you will be promoted to enter some default settings:


Simply enter the site's URL along with some general email settings and you are ready to go.

Wednesday, August 5, 2015

Sitecore media library database storage compared with file system storage

The Sitecore media library is one of the great features available out of the box with Sitecore. Not only does it allow you to keep all media files (images, documents, video/audio etc.) in one place, but they can also be versioned and kept in a clean folder structure similar to Sitecore content items. You are also able to search through the items, which other content management systems may not offer.

By default, the storage mechanism for the Sitecore media library is database - that is the files are all stored in SQL Sever as blobs. However this is a configurable setting and the storage mechanism can be set to file system. Like anything in the development/infrastructure world, there is an argument about which method is best - database or file system. Ultimately the answer depends on that particular implementation and it's requirements; so here are the facts that can be used to make a decision.

Sitecore Media Library - Database Storage

The main benefit here is that there are no physical files to work with. If you have a more complex Sitecore server architecture (with multiple content deliver server for example), then there is the issue of syncing the physical files across servers. Database storage removed the dependency on physical files, so all content delivery servers have the same data source, also it allows syncing of the media across environments (dev, test, production) easy via the use of the package manager or hedgehog TDS.

The main downside here is that as your media library grows the database grows, which can have affects on the resources needed to both run the database server and back it up. Also because it takes .NET code to retrieve and render these images via the ashx handler, the Sitecore servers will also require more resources to work with media stored in the database. 

In terms of file size limitations, you can store large media files (such as video) in the media library. However when you start getting into high traffic, or large numbers of these files, other solutions might be better suited. A video going viral for example, could bring down not only the database, but the Sitecore content delivery servers themselves.

Sitecore Media Library - File System Storage

File system storage can be beneficial in certain situations, especially when a third party content delivery network is involved. A CDN will require actual files so this would not work when using database storage, however there may be development effort required to actually get the CDN working with the images and to have them render from the correct location.

With the files not being stored in the database, the DBMS will require less resources (as it's not storing and processing large amounts of media). Backups of the databases are not as troublesome, and require less storage space. Also there is less potential for data blocking and other issues that may occur in a busy or under-resourced database.

Conclusion

As with any development or architectural consideration, there is never a one size fits all approach that will work every time. In terms of which storage method to use with the Sitecore media library the business requirements need to be analysed to work out which method will work best with a given implementation. This is also an area where future proofing needs to be considered, there may not be many media items now, but if video files will be required down the track; then this will definitely influence a decision. 

Tuesday, August 4, 2015

IIS restrict access to a web site

For development and test servers which may need some external access, it can be good practice to set up security around which IPs can access the web sites and which will be denied. The first requirement is to install the required server role:

  1. Open the server manager
  2. Click Manage and then Add Roles and Features
  3. Select the installation type and click Next, then select the server and click Next
  4. Under server roles expand Web Server (IIS) > Web Server > Security and then check IP and Domain Restrictions
Now under IIS manager, the IP and Domain Restrictions item will be available at the web site level. 

To block all IP addresses by default: Edit Feature Settings and set Access for unspecified clients to Deny. Allow entries can then be added for any IPs which you wish to have access to the web site. 

The reverse can also be done, with Access for unspecified clients set to Allow and any IP addresses you wish blocked added as Deny Entries.

Internet Explorer and Initial Keyword CSS

I came across an issue with CSS and the initial keyword. In CSS initial is used to effectively inherit the properties from the parent. However this keyword is not supported in any versions of internet explorer which can lead to elements rendering incorrectly. The fix is to add the property inherit first, and then initial on the next line. This will allow the element to render correctly in IE and as normal in other browsers.
left: inherit !important; /* IE */
left: initial; /* Other Browsers*/