Case Study: Retail Analytics

May 17, 2024

Understanding customer behavior within a physical retail space is key to optimizing store layout, staffing levels, and marketing efforts. By using simple IoT sensors and the ioCtrlMQ dashboard, retailers can gain valuable, real-time insights into foot traffic and customer flow, similar to how e-commerce sites use web analytics.

Dashboard showing retail analytics and foot traffic

The Challenge

A boutique clothing store wants to understand its peak hours for foot traffic throughout the day and week. They also want to know which sections of the store are most popular. This information will help them optimize staff schedules to handle busy periods and place high-margin items in high-traffic areas.

The Solution with ioCtrlMQ

The store installs two types of simple, low-cost sensors that communicate over Wi-Fi and publish to an MQTT broker:

  1. Entrance/Exit Beam Sensor: An infrared beam sensor is placed at the main entrance. Each time the beam is broken, it sends a message to the store/entrance/coun topic, incrementing a counter.
  2. Presence Detectors: Passive Infrared (PIR) sensors are placed in key zones of the store (e.g., "Womenswear", "Menswear", "Accessories"). When a sensor detects motion, it publishes a '1' to a topic like store/zone/womenswear/presence. When motion ceases for a minute, it publishes a '0'.

An ioCtrlMQ dashboard is created to visualize this data:

  • Line Chart: A Line Chart widget subscribes to the store/entrance/count topic. It's configured to show the number of visitors over time, aggregated into 15-minute intervals. This chart clearly visualizes the store's peak hours.
  • Text Display: A Text Display widget shows the total visitor count for the current day, providing a key performance indicator.
  • Multi-LED Panel: A Multi-LED widget is used to visualize zone occupancy. Each LED corresponds to a store zone. It lights up when the presence topic for that zone sends a '1', giving an instant visual cue of which areas are currently busy.
  • Bar Chart: A Bar Chart widget displays the total time each zone has been occupied throughout the day. This is achieved by a simple script that listens to the presence topics and calculates total occupancy time, helping to identify the most popular sections over a longer period.

The Outcome

After a week of collecting data, the dashboard clearly shows that the store's busiest period is between 12:00 PM and 2:00 PM on weekdays, and all day Saturday. The store manager adjusts the staff schedule to have more employees on the floor during these times, improving customer service. The bar chart reveals that the "Accessories" section near the checkout counter is surprisingly popular. In response, they place a new, high-margin product line in that section, resulting in a measurable increase in sales for those items.