In my experience, helping businesses design marketing campaigns for existing customers can be one of the toughest analyses to accomplish. You have access to a list of all your customers' email addresses and all their purchases, but how do you create a targeted email list and send meaningful content that will trigger repeat purchases and expand a customer’s lifetime value? How can you accurately target customers the way larger companies with in-house data science teams, such as Amazon and Netflix, do?

After collaborating with some of our Professional Data Services clients, I’m excited to announce a new offering from our Professional Services team: affinity analysis. Commonly referred to as market basket analysis in retail application, this analysis allows you to divide your customers into groups, cross-sell products, and guide your website and loyalty program designs. To get us started, here’s a quick introductory video on affinity analyses.



If these types of insights would be valuable for you and your organization, contact our support team for further information and pricing. If you’re not using RJMetrics and want to learn more reach out!

The basics of an Affinity Analysis

At its core, an affinity analysis is a data mining technique that uses association rule learning to identify the relationships between customers and the attributes related to them. With stronger and more common relationships, you can then group your customers into segments to analyze further. To get started, all you need is access to your customer and order data.

Let's consider the example of a typical grocery store. There are a variety of products we assume people will often purchase together at a grocery store: ice cream and waffle cones, peanut butter and jelly, turkey and cream cheese (a personal favorite of mine!). By performing an affinity analysis on the grocery store’s data set, we can not only confirm our suspicions about which products are frequently purchased together, but also discover new relationships between products and customers that we never would have guessed.

These relationships between products and customers are also known as association rules. After running an affinity analysis, rules are produced in the following form:

{item or group of items} {a different item}

For our fictional grocery store, here are some examples of rules that our affinity analysis may produce:

{waffle cones} {ice cream}
{flour, sugar} {eggs}

Each rule also comes with two important statistics that allow us to determine their significance: support and confidence.

  • Support of an item or item set is the % of transactions it appears in. For example, if we have 100 transactions total, and 10 contain waffle cones and ice cream, the support would be 10%.
  • Confidence of a rule is the % chance a new transaction which contains the left-hand side of a rule also contains the right-hand side. For example, if we have a confidence of 75% for our waffle cones and ice cream rule, there is a 75% chance that the next transaction which contains waffle cones will also contain ice cream.

With these insights, there are a variety of marketing campaigns, website optimizations, and product changes a business can make, such as:

  • Generate an email list of customers who have purchased the left-hand side of a rule but not the right-hand side.
  • Target those customers with content focused on the right-hand side product.
  • Add “Customers who purchased [left-hand side] also purchased [right-hand] side” notifications to your site.
  • Identify complementary groups of products to create special product bundles or discount codes for customers who purchase the entire set.

For RJMetrics clients, we’re able to seamlessly extract customer and order data from your data warehouse, run the analysis, and have the rules sent back into your data warehouse for further analysis and email list generation.

That’s a Wrap

Affinity analyses are used by some of the largest companies on a daily basis to inform their business’s decisions. Here at RJMetrics (a Magento company), our Professional Services team can help you perform an affinity analysis on your customer base to drive how you market and design your products. If you’re interested in exploring affinity analyses further with me, contact our support team for more information and pricing. If you’re not yet using RJMetrics and want to learn more reach out!