If the election results were based on how many people attend a candidate's events, Kamala Harris would be the Democratic frontrunner.

Gravy Analytics, a location-based marketing technology company, analyzed the smartphone data of people who attended the 111 solo Democratic presidential candidate events held in June and July. (Gravy disqualified other official party events as well as rallies held for multiple candidates.)

The company analyzed data it received from 100,000 apps it partners with. Users opt in to the tracking via permissions given to the app and the company says it accounts for users who may be logged in to several of the apps at once. The results, which are anonymized and grouped for statistical purposes, were shared first with Cheddar.

"Whether it's a Democratic presidential candidate, whether it's a movie, or whether it's a new wine launching in Sonoma, we just believe a true interest level is gauged by people's time and commitment to attend things like events rather than interest online," said Gravy Analytics CEO Jeff White.

"It shows much more interest if someone goes to Joe Biden's speaking event versus reading an article online about him," he added.

Presidential campaign rallies have been an unofficial bellwether for popularity. President Barack Obama's events cemented his strong support among youth, while President Donald Trump's attendance showed his passionate following better than most polls predicted.

In terms of total attendance, Gravy Analytics found most people went to Harris' events, followed by Cory Booker, Elizabeth Warren, Bernie Sanders, and Julián Castro. More than a quarter of the people who attended these events were between the ages of 18 to 34, and 56 percent were men. More than nine out of 10 people only went to one event.

Other interesting insights include: