Create a Digital Marketing Campaign on Windows Azure Web Sites
This guide provides a technical overview of how to use Windows Azure Web Sites to create digital marketing campaigns. A digital marketing campaign is typically a short-lived entity that is meant to drive a short-term marketing goal. There are two main scenarios to consider. In the first scenario, a third-party marketing firm creates and manages the campaign for their customer for the duration of the promotion. A second scenario involves the marketing firm creating and then transferring ownership of the digital marketing campaign resources to their customer. The customer then runs and manages the digital marketing campaign on their own.
Windows Azure Web Sites is a good match for both scenarios. It provides fast creation, supports multiple frameworks and languages, scales to meet user demand, and accommodates many deployment and source control systems. By using Windows Azure, you also have access to other Windows Azure services, such as Media Services, which can enhance a marketing campaign.
Although it is possible to use Windows Azure Cloud Services or Windows Azure Virtual Machines to host web sites, it is not the ideal choice for this scenario unless there is a required feature that Windows Azure Web Sites does not provide. To understand the options, see Windows Azure Web Sites, Cloud Services, and VMs: When to use which?.
The following areas are addressed in this guide:
This guide presents some of the most common areas and tasks that are aligned with public-facing .COM site development. However, there are other capabilities of Windows Azure Web Sites that you can use in your specific implementation. To review these capabilities, also see the other guides on Global Web Presence and Business Applications.
Deploy Existing Web Sites
In the Global Web Presence scenario, we discussed various options for creating and deploying a new web site. If you are new to Windows Azure Web Sites, it is a good idea to review that information. If you frequently create digital marketing campaigns, it is possible that you have existing web assets that you customize for different promotions. In this section, we'll look closer at the options for deploying various types of web sites from source control.
If you are reusing web assets for multiple purposes, you should strongly consider a source control management system, if you don't already use one. This allows you to store templates of common web solutions that can be branched and customized for specific customers. Web Sites provides the option to synchronize with many different source code repositories. On the Dashboard tab, select the Set up deployment from source control link.
This brings up a dialog with multiple source code control options. These include full-featured source control systems such as TFS as well as simple deployment solutions such as Dropbox.
You can use various source control techniques to manage the new project that is based on an existing baseline. For example, you can copy a baseline repository that was previously saved to begin work on the new project, or you can create a new branch to track the customizations for the current project. For a good example of the use of branches in managing different deployments from the same source control repository, see Multiple Environments with Windows Azure Web Sites. This post demonstrates how to use git branching to manage staging and production environments.
Once you've connected your Web Site to source control, you can configure and track deployments from the portal. For more information on using source control with Web Sites, see Publishing from Source Control to Windows Azure Web Sites.
When using existing web assets, it is also important to have flexibility to host many different types of web sites. On the Configure tab, you can select both .NET and PHP support for your web site.
In addition to these configuration options, Web Sites automatically provides support for Python 2.7 and Node.js. The default Node.js version is 0.10.5.
One additional advantage of Windows Azure Web Sites is the speed of deploying staged sites to the web. During the planning, prototyping, and early development of a site, the agency and their customer can look at real working versions of the campaign site before it goes live. Once the site is ready for production, the agency can either manage the production deployment for the customer or provide the web assets to the customer to deploy and manage.
Integrate with Social Media
Most digital marketing campaigns make use of social media sites, such as Facebook or Twitter. One integration point is to use the social media identities for authentication. For an example of this approach with an ASP.NET application, see Deploy a Secure ASP.NET MVC app with Membership, OAuth, and SQL Database to a Windows Azure Web Site.
However, many digital marketing campaigns go beyond authentication and use social media integration as a key part of their strategy. Social media sites typically have a developers section that explains different ways for applications to integrate with their services. Services that provide a REST API can be used from almost any web framework. However, there is often information that is specific to your language of choice. For example, Twitter provides a list of available libraries that support the Twitter API, including ones for .NET, Node.js, and PHP. This is one example, and you should look for similar developer guidance directly from each social media site that you choose to target.
For ASP.NET developer targeting Facebook, Visual Studio provides a template for an MVC 4 Facebook Application.
For a quick walkthrough of using this template with Web Sites, see Creating a Facebook app using ASP.NET MVC Facebook Templates and hosting them for free on Windows Azure Websites. For a more detailed tutorial and example application, see ASP.NET MVC Facebook Birthday App and The new Facebook application template and library for ASP.NET MVC.
If you are an ASP.NET developer, it is important to realize that your integration with social media is not limited by templates that Visual Studio provides. A template just helps to make the process simpler. But, as stated earlier, each social media site typically provides information on other ways to connect from .NET and from many other languages and frameworks.
Scale with User Demand
Cloud computing is useful for unpredictable workloads. Digital marketing campaigns fall into this category. It is difficult to predict the popularity of a relatively short-lived marketing site, because a lot depends on capturing user interest and the related social media interactions that drive more traffic to the site. Windows Azure provides several options for scaling both web sites and cloud services.
In the Management Portal, go to the Scale tab for your web site. There are several options for scaling. The first option determines the web site mode, which is set to Free, Shared, or Standard.
Scalability features and options increase with each tier. For example, Free mode sites cannot be scaled out to multiple instances, but Shared sites can be scaled out to 6 instances. You also have the option to scale up by selecting Standard mode. This mode runs your site on dedicated virtual machines and provides machine sizing options of small, medium, and large. After deciding the size of the virtual machine, you also have the option of scaling out to multiple instances. In Standard mode, you can scale out to 10 instances. A full list of the differences between each mode can be found in the pricing guidelines for Web Sites.
When you select Standard mode, you have the additional option of enabling the Autoscale (Preview) feature. This enables you to scale based on CPU. The Target CPU percent is a range of processor utilization that Windows Azure targets for your web site instances. If the average CPU is lower than this target, Windows Azure lowers the instance count, because the same load on fewer instances will result in increased utilization on the remaining instances. However, it cannot lower the instance count below the minimum Instance Count value. In the same way, if the average CPU is higher than the Target CPU, Windows Azure increases the number of instances. The same load spread across additional machines has the effect of lowering the CPU utilization on each machine. The number of instances added is limited by the maximum Instance Count value.
Automatic scaling makes much more efficient use of resources. For example, it is possible that digital marketing campaign is most active during nights and weekends. This also effectively handles a scenario where the popularity of a campaign unexpectedly increases. Automatic scaling helps to efficiently handle increased load and then decreases instances (and cost) when the load decreases.
For more information about scaling web sites, see How to Scale Web Sites. This subject is also closely tied with monitoring. For more information, see the section in this guide on monitoring your campaign.
For web applications that choose to use cloud services and web roles, there is an additional option to scale based on the length of items in a queue. In a cloud service, roles that process backend queues are a common architecture pattern. For more information on cloud service scaling, see How to Scale a Cloud Service.
Integrate with Other Services
A digital marketing site will often incorporate rich media, such as video streaming. Hosting these sites in Windows Azure provides close integration to related Windows Azure services. For example, you can use Windows Azure Media Services to encode and stream video for your web site. For more information on Media Services, see Introduction to Windows Azure Media Services Concepts and Scenarios.
Other Windows Azure services can be used to create a more robust application. For example, Web Sites can use distributed caching provided by the new Windows Azure Cache Service (Preview). Or you can use Windows Azure Storage Services to store application data and resources. For example, graphics, videos, and other large files can be durably stored in blobs. Database services, such as Windows Azure SQL Database and MySQL, are also available for relational data requirements.
Monitor the Campaign
The Monitor tab contains metrics that can help you to evaluate the success and performance of your digital marketing site.
For example, you can look at usage patterns and levels by looking at metrics such s CPU Time, Requests, and Data Out. All of these metrics will increase as the marketing campaign becomes more popular. Information about usage can be used to decide when to scale out or up. For more information, see How to Monitor Web Sites.
For Free and Shared modes, you also should be aware of resource quotas. On the Dashboard tab, the portal shows the current usage statistics of several quotas and when these quotas will be reset. These usage statistics vary depending on your selected mode. The following screenshot shows the statistics displayed for Free mode. In Shared mode, you do not have a quota for Data Out. In Standard mode, it displays only File System Storage and Size.
If you find that you're getting close to exhausting these quotas, consider moving from Free to Shared or from Shared to Standard. In Standard mode, you have dedicated resources on one or more small, medium, or large virtual machines.
In addition to using the Management Portal for this information, there are a number of third-party tools that provide advanced monitoring data for your web sites. For example, you can install a New Relic add-on from the Windows Azure Store. For a walkthrough on using New Relic for monitoring, see New Relic Application Performance Management on Windows Azure.
Finally, Standard mode web sites can enable endpoint monitoring and alerting. An endpoint monitor regularly attempts to reach your web site and then reports on response time. Alerts provide email notifications if the response time exceeds a specified threshold. For more information, see the monitoring section of the Global Web Presence scenario and the topic, How to: Receive Alert Notifications and Manage Alert Rules in Windows Azure.
Windows Azure Web Sites are a good choice for reusable web content that is customized for individual marketing campaigns. Web Sites supports many of the popular languages, frameworks, and source control systems, making it easier to migrate to these assets and workflows to the Cloud. The ASP.NET Facebook Application template makes it easier to create Facebook applications, but you can use almost any third-party social media integration that supports web interfaces. Windows Azure Media Services and other related services on Windows Azure provide additional tools to construct a well-designed campaign site. And the multiple manual and automatic scaling options are useful to handle user demand, which can be hard to predict. For more information, see the following technical articles.