Showing posts with label lead scoring. Show all posts
Showing posts with label lead scoring. Show all posts

05 December 2016

How to Collect and Log Web Clickstream Data



Clickstream Data


What is clickstream data?

The path a user takes through a website is generally referred to as the user's clickstream.



Why collect clickstream data?

When aggregated using map-reduce techniques and then using unsupervised machine learning predictive analytics techniques like clustering and association analysis, clickstream data can tell you many things, including

  • how users use your site
  • if there are different behavioral groups within users
  • what marketing works or does not work

Clickstream data can also be used to build recommender systems, perform ROI analysis on marketing (via Shapley values), and improve lead scoring




Client-side collection

Since a lot of the traffic to most websites is bot traffic, it is helpful to collect via client-side script as many bots do not evaluate JavaScript and many legitimate bots (e.g. search-engine spiders) identify themselves as such.

A simple method for collection is to add a <script> tag with an immediately-invoked function expression (IIFE) just before the closing </body> tag. An example of such a script is shown below.


The code above simply creates an image tag in code and assigns a source to it. The assignment of a src value causes the browser to fetch the requested resource.

  • Cache busting
    Since many browsers cache static resources, a random value is added to the URL as a cache buster.
  • Referrer
    For the purposes of clickstream data, it is useful to include the URL of the page that caused the current page to be loaded; this is called the "referrer" and is added to the pixel image URL as a parameter named "dr" (the name is "dr" is used to conform to the parameter names used in the Google Analytics Measurement Protocol.



Server-side ASP.NET MVC Listener


Pixel Endpoint

The code on the server side has three primary responsibilities:

  1. to set/update certain cookie values (explained below),
  2. to log the values, and
  3. to return something that the browser will accept (this response will carry the cookies)




Cookies

In general, there are four anonymous values that need to be tracked (if your site allows users to log in, it may be useful to add a fifth cookie to allow you to aggregate cross-device behavior). The values to be tracked/collected are:

  • Session ID
    A temporary anonymous identifier that allows you to group together the page view records captured by the end point. The value will be different each time the user visits your site anew but will remain constant while the user is using your site.
  • Sequence #
    A temporary integer value that allows you to order the page view log records. The value will increment as the user navigates the site.
  • Client ID
    A semi-permanent anonymous identifier that allows you to group together multiple sessions from the same browser/client. NOTE: the value is specific to the browser/machine/user combination: a different logged in user on a machine will have a different client ID; if the same user uses multiple browsers (e.g. Chrome and Firefox), each browser will have a unique client ID.
  • Session count
    A semi-permanent anonymous identifier that allows you to analyze how user behavior changes over subsequent visits.



Getting the value of a cookie from the client request

The code for retrieving a cookie value from the client request is fairly straight-forward. One needs to guard against the case where the cookie does not exist.




Incrementing the sequence value

The "seq" cookie is simply a counter. It, along with the time of the request, which is logged, allows the analyst to study how users navigate a site. Along with the previous page, which is passed up as the "dr" parameter, the sequence value is useful for multi-tab browsing scenarios.




Incrementing the session count

A new session will not have a session ID. If this is the case, the session count needs to be incremented. The session count cookie should be semi-permanent.




Setting the client ID

The client ID should be semi-permanent and should only be set if there is not one already set.




Setting the session ID

The session ID is a temporary value. It's value will be cleared when the user closes the browser. Although it may be tempting to define a session timeout period, since any value chosen will be arbitrary, it is important that the data logged be agnostic and that any session timeout adjustments desired be done during analysis.




Setting cookie values

To safeguard the cookie values and the user, it is important that the cookies be set to be HTTP-only (preventing client script and browser plugin/addon tampering), that the cookies be secure (i.e. HTTPS-only – your site should be HTTPS-only).

To make your pixel useful over all of your web assets, it is helpful to set the domain. Suppose you have domain names like the following:

  • www.example.com
  • blog.example.com
  • response.example.com
To have one pixel connect your users over all of these domains, simply set the domain of the cookie to "example.com".






Logging Values

Given the power of Map-Reduce technologies that are available in Hadoop, R, MongoDB, etc., it makes sense to store the initial data in JSON format.

Four additional pieces of information are added to the serialized data.

  • the time,
  • the user agent
    which is useful for distinguishing mobile from desktop sessions,
  • the page calling the pixel end point, and
  • the referring page that caused the page with the pixel code to be loaded

The code for serializing the values follows:




Full code with unit tests

The full source code for this article is available at https://github.com/stand-sure/Clickstream

27 January 2016

An Introduction to A/B Testing (Part 2) - Designing an email A/B Test

This is a continuation of our article An Introduction to A/B Testing (Part 1).

Designing an email A/B test

Email sent to prospects who have chosen to give your organization information is a unique medium in modern marketing in the following ways:
  • Your prospects have already expressed interest in your brand and have voluntarily shared information with you.
    • name
    • email address
    • phone number
    • product interest
  • Your systems also know something about the prospects
    • origin source/medium
    • keywords
    • previous website & media consumption
  • When you send email, your email automation system knows
    • if the email was received (potentially considered)
    • if (and when) the email was opened and by whom
    • if the CTA was clicked
    • the user on multiple devices (e.g. home computer, work computer, mobile phone, tablet, TV, …)
  • You do not have to pay to put the media in front of a prospect
  • The action rates (opens and clicks on CTAs) are much higher than other mediums
  • Prospects have trackable histories and futures
    • allowing you to do lead scoring
  • You can do follow-up experiments on prospects

Picking which email to test

Let’s start at the very beginning
A very good place to start
– “Do-Re-Mi” from “The Sound of Music”,
Rodgers & Hammerstein
When you are starting out, start at the beginning with the first email (the “thank you” email, which should be sent immediately after sign-up) and with the first scheduled campaign email (which is probably being sent when the prospect is not actively engaging with your content).
Early emails are where you win or lose the eyeballs of a fresh prospect with respect to future marketing. If the prospect does not find the emails useful, (s)he is less likely to open future emails. The improvements you make early in an email relationship can lift the results of successive emails and increase your sales/wins. (You can and should measure how each test group does on subsequent identical emails.)

Assigning prospects to groups

All of the email systems we have encountered assign identifiers to prospects.
An easy, recommended scheme for a 50/50 A/B test on new prospects is to assign the even-number IDs to one group and the odd-numbered IDs to the other group.
When you begin testing later emails, we recommend what are called “paired tests” in which you build several customer “segments” based on certain characteristics and then divide each segment into two groups (although the even/odd approach often works here, we tend to export the IDs in each segment, randomly assign groups and then import the group assignments). Paired tests reduce variance and often allow you to use smaller sample sizes to obtain statistically significant results.

Deciding what is a conversion

You have many choices: open, click, form completion, in-person visit, RPQ, price quote, sale, referral, …
Your email automation system is collecting opens and clicks on every email. If your system is website-integrated and things are properly set up, then you are probably able to measure customer
What you pick to use as a conversion depends on
  • business goals
  • the ability of your systems to automatically tie the conversion back to the email
  • conversion time
Our advice is to
  1. Measure as a conversion the logical next step after encountering the media (an open or a click)
  2. AVOID using anything that is too long-term as a conversion (you should always measure the performance; it is important to move at “internet speed”, however — is there a milestone before the long-term event that can be used as an indicator?)
  3. Once you have decided what to test, measure (and report) the logical second step the prospect should take sua sponte — if you drive up open rates, but clicks on your CTA don’t increase, did you really improve?
  4. Measure and report the performance of the next email for each group — improving the open rate on a bad/low-utility email can do more harm than good — it is important to catch this early.

In the next article in this series, we will discuss "Measuring Results".

20 January 2016

Continuous improvement is better than delayed perfection.
– Samuel Clemens (a.k.a. Mark Twain)

Introduction

Sold/won.
Topline.
Revenue.
Your data tells a story. Listen. Sell more.™
The revenue opportunity with the best ROI for any organization is increasing the win rate of existing leads/prospects.
A/B testing is where you start. It is low cost and relatively quick.
The communication your organization shares with prospects has the goal of increasing conversions.
A/B testing helps you determine how to improve individual pieces of communication media to increase conversions and achieve your organization’s objectives.

What is A/B testing?

A/B testing is comparing two versions of a piece of media (an email, a web page, a digital advertisement, etc.) to see which one performs better.

The performance of each piece of media is compared by showing the two variants to similar users at the same time.
The one that gives a better statistically-significant conversion rate, wins.
A-B testing examples
typeAB
button color
buttons vs. linksVisit our site
graphical vs. text element

visit us
subject lineThree-day Sale25% off this weekend
senderFrom: SalesFrom: Bob
PersonalizationDear CustomerDear Sue
menu order
  • Home
  • Buy Now
  • Contact Us
  • Home
  • Contact Us
  • Buy Now
It is best to use caution when generalizing the results of one A/B test to all of your emails. All the result tells you is that for this particular scenario one option outperforms the other. When extending the learning to prescribe changes in other emails, A/B tests should be conducted on those emails before the change is made globally.

Why should my organization do A/B testing?

Try this – you’ll be amazed
Construct a table like the following for your first three emails.
Email #Opened?Win Rate
1Yes25%
1No10%
2Yes30%
2No8%
3Yes32%
3No5%
Enter your values below
Email #Opened?Win Rate
1Yes %
1No %
2Yes %
2No %
3Yes %
3No %
What you will discover is that the customers who open your email are more likely to convert to a win.
You can sell more simply by selling smarter.

Cost & Time

A/B testing a particular piece of media is free (you’re already paying for the email marketing automation system, website, etc.).
A/B testing a single piece of media generally takes little time to set up and start.
The other things you can do to increase sales — Price (adjustment/discount), Promotion (advertising), People (hiring & training), Place (new location(s)/relocation(s)), etc. — tend to have meaningful OPEX/CAPEX costs. They also can take meaningful time to implement.
Low resource utilization & quick vs. high resource utilization & slow — if you want more conversions, A/B testing is the logical place to start.

Segmentation & Lead Scoring

How customers interact with a piece of optimized media allows you to group them into segments, allowing more use-case/persona specific messaging.
With an ensemble of responses to optimized media, you can group prospects into clusters, which are very, very valuable for lead scoring.
With reliable lead scoring, your sales teams will be able to prioritize higher-performing clusters. Your revenue will increase without additional investment — a ROI win!

What can be tested?

Email

  • Subject lines
  • Calls to action (CTA)
  • CTA colors
  • Cadence (the timing between emails)
  • Omission (whether a particular email in the sequence matters)
  • Sending day of week
  • Sending time of day
  • Deliverability

Web

  • Landing pages
  • Sign-up pages
  • Menus
  • CTAs
  • Site navigation elements
  • Responsive design layouts

Display advertising

  • Flash vs. animated GIFs
  • CTAs
  • Destination landing page
  • Dayparts
  • Behavioral/demographic targets

Search engine marketing

  • Headlines
  • Display URLs
  • Descriptions
  • Extensions
  • Day parts

The next part of this series "Designing an A/B Test" will published in the next few days.