As merchants get more aggressive when attracting consumers on mobile apps,  marketing is increasingly about proactive targeting that personalizes pitches for both what is offered, and when.

Today the race involves tracking location data from consumers' smartphones to send offers when they're close to retailer locations. But soon, it will also involve technology that can sense consumers' emotions and predict their plans throughout the day.

Ryan Martin, an analyst of wearable technologies at 451 Payments, imagines a world where location data and social data are used together within a connected Internet of Things environment.

For instance, with only location data, a merchant might send a consumer driving through a town a coupon to the nearest restaurant. But if a provider could leverage social media data and information from an Internet-connected car, the provider would know that the consumer is driving to their parent's house to celebrate a birthday and instead send a coupon for a birthday cake shop near the destination.

Swipely, which offers "big data" management to  merchants, aggregates weather patterns alongside posts on Facebook and other social media sites.

Companies like PayPal and shopkick use Bluetooth-enabled beacons to tie a user's in-store location data to mobile marketing.  Beacon hardware manufacturer Roximity is developing marketing technology that leverages beacons. A grocery store using Roximity's technology could allow a third-party manufacturer, such as Hershey, to utilize its beacon network for a holiday promotion.

Meat Pack, a specialty shoe retailer in Guatemala, also uses location data to detect when its customers are in a rival's store in the same mall. It then sends an offer to the customer's phone that changes over time–the faster the shopper runs to Meat Pack's store, the bigger the discount.

While many of these initiatives appeal to consumers when they're already in or near a store to lead them to specific products and deals, others look at what consumers are doing when they're not shopping.

One of the more futuristic technologies under development is a computer program that can recognize a user's emotions. This computer program, developed by researchers in Bangladesh, tracks keystroke dynamics and analyzes text patterns. It accurately recognized joy 87% of the time and anger 81% of the time.

"While much work remains to be done, this research is an important step in making emotionally intelligent systems that recognize users' emotional states to adapt their music, graphics, content or approach to learning a reality," says a press release about the publication of the research in the journal, Behaviour & Information Technology.

This kind of emotion detection is part of a growing field of study called "affective computing."

In the future, merchants might be able to see when I've broken up with my boyfriend.  And although I'm telling my friends over Facebook message that I'm fine, the rate at which I'm typing shows that I'm upset. Then merchants could send me offers for discounted pints of chocolate/peanut butter ice cream and romantic comedies starring Ryan Gosling, and I'd likely take the bait.

Advertisers and marketers are now trying to infiltrate private messaging apps, such as SnapChat and WhatsApp. These apps have seen explosive growth among millennials.

The New Orleans Saints was one of the first brands to take advantage of marketing through text and video in SnapChat, according to VentureBeat. The Saints sent users merchandise photos and clips of players both on and off the football field.

And if merchants targeted these ads in a social app that already included payments capabilities, such as person-to-person mobile app Venmo, they might see increased spend.  Venmo is owned by PayPal's Braintree, and its technology enables a one-click checkout experience within apps.

Venmo has seen massive growth recently.  While some industry analysts thought payments and social media weren't two peas in a pod, Venmo, which allows users to post their transactions accompanied with messages on a Twitter-like feed within the app, has proven them wrong.

"Initially I was so against the concept of integrating social media into P2P payments," said Jordan McKee, a senior analyst with 451 Payments.

But McKee finally gave in and downloaded Venmo. "I started looking through my friends' transactions and was so interested by it," he said. "The social component for millennials and college-aged kids is pretty cool and adds an exciting layer over a traditionally boring task."

And with a rise in connected wearable technology, this mobile marketing may become even more specialized and relevant for consumers.

Nike has been playing with wearable technology for some time, although the company recently laid off nearly all of the team behind FuelBand—a fitness-tracking bracelet—to focus on software instead of hardware.

But Martin envisions Nike and other sports gear manufacturers getting back into wearables with embedded sensors in clothing. A sensor in a pair of shoes could track use and notify consumers when their current pair is about to wear out. A discount could also be sent for purchasing a new pair.

"For a consumer it's great because you don't need to personally track or think about these things," said Martin. "The perception of marketing becomes less and this becomes more of a value add to the customer brand relationship."

Bailey Reutzel  is a reporter at PaymentsSource.