Brick-and-mortar stores are scrambling to understand their customers. Facing intense competition from online retailers who can gather extensive data about user behavior, traditional retailers have also started tracking customers’ in-store activities. From special equipment that picks up cell phone signals in the area to software that identifies people in video footage, brick-and-mortars are learning more about their customers — often without them knowing.