Comprehensive CX Analysis Using Omnichannel Data

Omnichannel data collection and integration

The customer journey can start with a click on a banner, continue with a request via a voice assistant and end with a call to the call center, it is important to keep all channels under control and understand what and how works. This is the essence of omnichannel.

Data sources: from web traffic to offline visits

Each source represents a separate universe of data, and each of these universes must be able to be interpreted correctly.

  1. Online channels: Websites and apps are some of the most obvious sources of data. Here we are dealing with web traffic, user behavior on pages, conversion, actions in mobile apps, and so on. It is important not only to look at raw numbers like the number of visits, but also to dive deeper into analytics: where the user came from, what interested them, how long they spent on the site, and what prompted them to make a purchase or, conversely, leave.

  2. Social media: When a user likes a post or comments on a publication, they are not just interacting with your content, they are leaving important data. Here we are dealing with huge amounts of unstructured data. It is important not only to collect likes and shares, but to analyze what exactly attracts the audience's attention, what topics are of interest, and which ones cause rejection.

  3. Mobile applications: Data from apps includes everything from geolocation to specific actions within the interface. For example, data on how often a certain feature is used can suggest what exactly should be improved or added in the future.

  4. Call centers and offline data: Don't forget about traditional customer interactions, either. Calls to a call center and visits to physical stores are also important sources of data. It's important to be able to combine this data with online information to create a truly holistic view of the customer.

Data Collection Methods: API, CRM, and More

Data collection is far from being a simple process of storing information in a database. It is a strategy that uses different tools and approaches.

  1. Automated systems: Using tools that automatically collect data can make the process much easier. For example, web analytics systems that allow you to automatically track user behavior on your site and collect key metrics.

  2. API integrations: If there are multiple data sources, such as social networks or external services, API integrations become a must-have. Through API, you can connect to external platforms and receive data in real time.

  3. CRM and CDP platforms: These platforms allow you to collect customer data from different channels and store it in one place. CRM helps you track all interactions with a customer, whether it’s sales, marketing, or service. CDP goes even further by combining data from different sources and creating a single, unified customer profile.

Data Integration

Now that the data is collected, the integration begins. It is important not only to combine the data, but also to normalize it so that it spoke the same language.

  1. Data Merging: This stage involves collecting all the data in one place where it can be analyzed. It is important to set up user identification correctly so that data from different channels is linked to the same customer. For example, the same user may interact with a brand through a website, a mobile app, and a call center. To properly combine this data, you need to connect different identifiers.

  2. Data normalization: Data from different sources often has different formats. For example, the same action in web analytics and CRM may have different names. The goal of normalization is to bring all data to a single format so that they can be analyzed together.

  3. Creating a single client profile: Once the data is aggregated and normalized, it creates a single customer profile. This profile includes all of the customer’s interactions with the brand, their preferences, behavior, and purchase history.

Data Analysis Methods

To extract the maximum useful information from data, you need to use proven analysis methods.

  1. Cohort analysis

    Cohort analysis is a way to group users based on the time they interact with your product or service. Unlike traditional analysis, which treats all users as one big mass, cohort analysis allows you to identify individual groups (cohorts) and analyze their behavior over time.

    For example, you could identify a cohort of users who first signed up in a particular month and see how their interactions with the product changed over time.

  2. Segmentation

    Segmentation is the process of dividing your entire customer base into smaller groups based on common characteristics. These characteristics can include demographics, on-site behavior, purchasing activity, and more.

    Let's say there is a segment of users who frequently make purchases for certain amounts. This segment can be analyzed separately and marketing campaigns can be tailored to them, making offers that will be most attractive to them.

  3. Personalization

    Personalization is the next level after segmentation. This is where product and marketing adaptations to the specific needs and preferences of each customer begin. This can be based on their previous interactions, purchases, or predicted behavior.

    For example, if a customer buys sporting goods, the system can automatically suggest new releases in that category or send personalized recommendations via email.

  4. Creating behavior patterns

    Behavioral modeling is the use of data to predict how users will behave in the future. These models are built by analyzing past data and can predict events such as the likelihood of purchase, churn, or response to marketing campaigns.

    Using behavioral models, you can, for example, identify which customers are most likely to cancel their subscription in the near future and offer them special terms for renewal.

You can also add various ML methods to this list. And of course, don't forget about data visualization.

Example of analysis

Let's create an abstract dataset

Let's start by creating a random data set:

import pandas as pd
import numpy as np

# генерация данных клиентов
np.random.seed(42)
num_customers = 2000
customer_ids = np.arange(1, num_customers + 1)

# базовая информация о клиентах
customers = pd.DataFrame({
    'customer_id': customer_ids,
    'signup_date': pd.to_datetime(np.random.choice(pd.date_range(start="2022-01-01", end='2022-12-31'), num_customers)),
    'age': np.random.randint(18, 65, size=num_customers),
    'gender': np.random.choice(['Male', 'Female'], size=num_customers),
    'location': np.random.choice(['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix'], size=num_customers),
    'income_level': np.random.choice(['Low', 'Medium', 'High'], size=num_customers)
})

# генерация данных о взаимодействии с каналами
num_interactions = 20000
interactions = pd.DataFrame({
    'interaction_id': np.arange(1, num_interactions + 1),
    'customer_id': np.random.choice(customer_ids, num_interactions),
    'channel': np.random.choice(['website', 'mobile_app', 'call_center', 'physical_store'], num_interactions),
    'interaction_date': pd.to_datetime(np.random.choice(pd.date_range(start="2023-01-01", end='2023-07-31'), num_interactions)),
    'interaction_type': np.random.choice(['view_product', 'add_to_cart', 'purchase', 'customer_support', 'visit_store'], num_interactions),
    'amount': np.where(np.random.rand(num_interactions) > 0.7, np.round(np.random.uniform(10.0, 1000.0, num_interactions), 2), 0)
})

# объединение данных клиентов и взаимодействий
data = pd.merge(interactions, customers, on='customer_id')

# вычисление дополнительных метрик
data['days_since_signup'] = (data['interaction_date'] - data['signup_date']).dt.days
data['product_views_before_purchase'] = data.groupby('customer_id')['interaction_type'].apply(lambda x: (x == 'view_product').cumsum())
data['average_time_between_interactions'] = data.groupby('customer_id')['days_since_signup'].diff().fillna(0)

Analysis with cohort method

We will use the cohort method for analysis. Let's look at how customer interactions change over time and how this affects conversion:

# определение когорт на основе месяца регистрации
data['signup_month'] = data['signup_date'].dt.to_period('M')

# анализ активности по когортам
cohort_data = data.groupby(['signup_month', 'days_since_signup', 'interaction_type']).agg({
    'interaction_id': 'count',
    'amount': 'sum'
}).rename(columns={'interaction_id': 'num_interactions', 'amount': 'total_spent'})

cohort_data.reset_index(inplace=True)
print(cohort_data.head())

# вычисление конверсии по когортам
cohort_conversion = cohort_data[cohort_data['interaction_type'] == 'purchase'].copy()
cohort_conversion['conversion_rate'] = cohort_conversion['num_interactions'] / cohort_data.groupby('signup_month')['num_interactions'].transform('sum')
print(cohort_conversion.head())

We divided customers into cohorts based on the month of registration and analyzed their interactions. We calculated conversion by cohort to understand how it changes over time.

Segmenting customers

We will segment customers using the K-means algorithm. This will allow us to divide customers into groups based on their behavior and demographic characteristics.

from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler

# выбор признаков для кластеризации
features = ['age', 'income_level', 'product_views_before_purchase', 'average_time_between_interactions', 'total_spent']
data_for_clustering = data.groupby('customer_id').agg({
    'age': 'mean',
    'product_views_before_purchase': 'sum',
    'average_time_between_interactions': 'mean',
    'total_spent': 'sum',
    'income_level': lambda x: x.mode()[0] if len(x.mode()) > 0 else np.nan
}).dropna()

# преобразование категориальных данных
income_map = {'Low': 0, 'Medium': 1, 'High': 2}
data_for_clustering['income_level'] = data_for_clustering['income_level'].map(income_map)

# масштабирование данных
scaler = StandardScaler()
scaled_features = scaler.fit_transform(data_for_clustering)

# применение K-means кластеризации
kmeans = KMeans(n_clusters=4, random_state=42)
data_for_clustering['cluster'] = kmeans.fit_predict(scaled_features)

print(data_for_clustering.head())

We selected several features that characterize customers and performed clustering using K-means. As a result, we obtain several clusters that represent different groups of customers.

Let's apply ML

Now that you have customer segments, you can create a model that will predict the likelihood of purchase based on customer characteristics:

from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report

# подготовка данных для машинного обучения
X = data_for_clustering.drop(columns=['cluster'])
y = data_for_clustering['cluster']

# разделение на обучающую и тестовую выборки
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# обучение модели
model = RandomForestClassifier(random_state=42)
model.fit(X_train, y_train)

# предсказание на тестовой выборке
y_pred = model.predict(X_test)

# оценка модели
print(classification_report(y_test, y_pred))

We created a random forest-based model that predicts which clients belong to which clusters.

Let's visualize

To better understand the results of our analysis, let's create several visualizations:

import matplotlib.pyplot as plt
import seaborn as sns

# визуализация кластеров клиентов
plt.figure(figsize=(12, 6))
sns.scatterplot(data=data_for_clustering, x='age', y='total_spent', hue="cluster", palette="viridis")
plt.title('Кластеры клиентов по возрасту и сумме потраченных средств')
plt.xlabel('Возраст')
plt.ylabel('Сумма потраченных средств')
plt.show()

# визуализация конверсии по когортам
plt.figure(figsize=(12, 6))
sns.lineplot(data=cohort_conversion, x='days_since_signup', y='conversion_rate', hue="signup_month")
plt.title('Конверсия по когортам')
plt.xlabel('Дни с момента регистрации')
plt.ylabel('Конверсия')
plt.legend(title="Месяц регистрации")
plt.show()

We created two graphs: the first shows how client clusters are distributed by age and amount spent, and the second displays the dynamics of conversion by cohort.


You can gain more practical skills in analytics within the framework of practical online courses from industry experts.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *