In-app advertisements have become a major revenue for app developers in the mobile app economy. Ad libraries play an integral part in this ecosystem as app
developers integrate these libraries into their apps to display ads. However, little is known about how app developers integrate these libraries with their apps and how these libraries have evolved over time.
In this thesis, we study the ad library integration practices and the evolution of such libraries. To understand the integration practices of ad libraries, we manually study apps and derive a set of rules to automatically identify four strategies for integrating
multiple ad libraries. We observe that integrating multiple ad libraries commonly occurs in apps with a large number of downloads and ones in categories with a high percentage of apps that display ads. We also observe that app developers prefer to manage their own integrations instead of using off the shelf features of ad libraries for integrating multiple ad libraries.
To study the evolution of ad libraries, we conduct a longitudinal study of the 8 most popular ad libraries. In particular, we look at their evolution in terms of size, the main drivers for releasing a new ad library version, and their architecture. We observe that ad libraries are continuously evolving with a median release interval of 34 days. Some ad libraries have grown exponentially in size (e.g., Facebook Audience Network ad library), while other libraries have worked to reduce their size. To study the main drivers for releasing an ad library version, we manually study the release notes of the eight studied ad libraries. We observe that ad library developers continuously update their ad libraries to support a wider range of Android versions (i.e., to ensure that more devices can use the libraries without errors). Finally, we derive a reference architecture for ad libraries and study how the studied ad libraries diverged from this architecture during our study period.
Our findings can assist ad library developers to understand the challenges for developing ad libraries and the desired features of these libraries.
4. Ads are displayed in mobile apps using
โAd librariesโ that are provided by different ad
networks
4
Advertising
company
(e.g., KFC)
Ad network
(e.g., Google)
Ad libraryprovides
App
integrates Ads
serves
displays
has contract with
App user installs
5. Prior research considers three perspectives for ad
libraries
5
1) The updates of ad libraries
2) The cost of ad libraries
3) The security of ad libraries
6. The research literature considers three
perspectives for ad libraries
6
1) The updates of ad libraries
2) The cost of ad libraries
3) The security of ad libraries
How frequently do app
developers update ad libraries
[Ruiz et al.]
Why and when app developers
update ad libraries [Derr et al.]
7. The research literature considers three
perspectives for ad libraries
7
1) The updates of ad libraries
2) The cost of ad libraries
3) The security of ad libraries
The impact of ad libraries on
app rating [Ruiz et al.]
Hidden cost of ad libraries in
performance, memory usage,
and network usage [Gui et al.]
8. The research literature considers three
perspectives for ad libraries
8
1) The updates of ad libraries
2) The cost of ad libraries
3) The security of ad libraries
Changes in the requested
permissions of ad libraries over
time [Book et al.]
What types of permissions are
requested by ad libraries
[Derr et al.]
9. 9
Prior work does not examine the integration of ad
libraries and their evolution
App Ad libraries
10. Thesis statement
10
Studying the integration practices of ad
libraries and the evolution of these libraries
can help ad library developers understand the
current challenges of developing such libraries
and possible improvements for these libraries
11. We study ad libraries along two perspectives
11
The integration practices of ad libraries1
The evolution of ad libraries2
[Under review in TSE]
[Under major revision in EMSE]
12. To study how app developers integrate ad
libraries, we analyzed Android apps from the
Google Play Store
12
Google Play
1,840 top free-to-download Android mobile apps
35,462 updates over a period of 18 months
from April 20th 2016 to September 20th 2017
Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
13. Examples of the 63 identified ad libraries
13Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
14. Ad libraries are not only used for serving ads but
also for analytical purposes
14Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
29.3 %
8.4
%
62.3%
Apps did not
integrate
ad libraries
Apps integrate
ad libraries for
displaying ads
Apps integrate
ad libraries
for solely analytical
purposes
15. App developers integrate multiple ad libraries
15Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
๏ As much as 19 ad libraries can be integrated
๏ 60% of the ad-displaying apps integrate multiple ad libraries
16. Apps with a large number of downloads are more
likely to integrate multiple ad libraries
16Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
Multiple-adsratio
Multiple-ads ratio
=
# ๐๐ ๐๐๐๐ ๐ค๐๐กโ ๐๐ข๐๐ก๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐๐๐
# ๐๐ ๐๐๐๐ ๐ค๐๐กโ ๐ ๐ ๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐ฆ
18. 18Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
Select a
statistically
representat-
ive sample of
62 apps
Generate a
static call
graph for
each selected
app
Manually
investigate
every
selected app
We manually studied apps to identify common
strategies for integrating multiple ad libraries
Identify 4
common
strategies
Derive a set
of rules to
automatically
identify each
strategy
19. Identified 4 common strategies for integrating
multiple ad libraries
19
Easy to integrate
multiple ad libraries
Dynamic and
accurate estimates
of ad revenue
Does not support all
existing ad libraries
Less transparent
process for serving
an ad
(1) External-mediation strategy
(1) External-mediation
(2) Self-mediation
(3) Scattered
(4) Mixed
20. Identified 4 common strategies for integrating
multiple ad libraries
20
Integrate any
existing ad library
More control over
selecting an ad
library
One must write
self-mediator
Ordering of ad
libraries is static
(2)Self-mediation strategy
(1) External-mediation
(2) Self-mediation
(3) Scattered
(4) Mixed
21. Identified 4 common strategies for integrating
multiple ad libraries
21
(3) Scattered strategy
Quick integration
of ad libraries
Select different ad
formats based on
app event
More effort to
maintain code
May lead to lower
ad revenue
(1) External-mediation
(2) Self-mediation
(3) Scattered
(4) Mixed
22. Identified 4 common strategies for integrating
multiple ad libraries
22
(4) Mixed strategy
Integration of many ad
libraries that are not
supported by external-
ad mediators
Might cause ad
synchronizing issues
(1) External-mediation
(2) Self-mediation
(3) Scattered
(4) Mixed
23. The currently available external-ad-mediators are
not satisfying their needs
23Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
๏ 75% of the apps use the mixed or self-mediation strategies
๏ Hence, app developers must write their own centralized packages
(self-mediator)
๏ Only 20% of the identified ad libraries are supported by the external-
ad-mediators
24. Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
Take-home: ad library developers need to better
facilitate the integration of multiple ad libraries
24
25. We study ad libraries along two different
perspectives
25
The integration practices of ad libraries1
The evolution of ad libraries2
[Under review in TSE]
[Under major revision in EMSE]
26. We selected the top eight most popular ad
libraries from the top free-to-download apps
26The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
Google Play
1,840 top free-to-download Android mobile apps
We downloaded the release notes and the Jars
of the 163 released versions of the 8 most
popular ad libraries over a period of 33 months
27. 27The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
We selected 8 popular ad libraries for our study
mobile ad network
28. A longitudinal study of popular ad libraries
28The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
RQ1: How often are ad libraries released, and how large are
these releases?
RQ2: What drives ad library developers to release a new
version?
RQ3: How did the architecture of ad libraries evolve over
time?
29. The studied ad libraries had a median release
interval of approximately one month
29
81 67
37 34 30 30 23 2134
30. We identified 4 trends in the size evolution of the
studied ad libraries
30The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
(1) Explosive growth
(2) Stable growth
(3) Shrinkage
(4) Fluctuating size
mobile ad network
31. A longitudinal study of popular ad libraries
31The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
RQ1: How often are ad libraries released, and how large are
these releases?
RQ2: What drives ad library developers to release a new
version?
RQ3: How did the architecture of ad libraries evolve over
time?
32. We manually analyzed release notes
32The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
Release notes of the 163 released
versions of the studied ad libraries
over a period of 33 months
33. Ad library developers are constantly updating their
ad libraries to support the Android version
33The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
๏ Android is updated approximately every 6 months
๏ Ad library developers support the updated features of Android version
๏ Ad library developers support older Android version to ensure that their
libraries work on many devices
๏ The median number of days required to support for the newer Android
version is 49 days
34. Ad library developers are constantly updating their
ad libraries to support the Android version
34The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
Kitkat
Lollipop
MarshMallow
Nougat
Oreo
Pie
๏ Android is updated approximately
every 6 months
๏ Support the latest Android
version (Target SDK version)
๏ Support older Android version to
ensure ad libraries work on many
devices
โLowered our libraryโs minimum SDK version to fix build issues with apps
that support earlier versions. โ
35. The most occurring driver for releasing a version is
to add or improve โvideo streamingโ ads
35The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
We identified four main features related to video streaming ads
(1) Offering rewarded video ads
(2) Adding video control
(3) Handing native video ads
(4) Prefetching video ads
36. The most occurring driver for releasing a version is
to add or improve โvideo streamingโ ads
36The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
We identified four main features related to video streaming ads
(1) Offering rewarded video ads
(2) Adding video control
(3) Handing native video ads
(4) Prefetching video ads
Ad
37. The most occurring driver for releasing a version is
to add or improve โvideo streamingโ ads
37The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
We identified four main features related to video
streaming ads
(1) Offering rewarded video ads
(2) Adding video control
(3) Handing native video ads
(4) Prefetching video ads
App context Native
Video ad
38. The most occurring driver for releasing a version is
to add or improve โvideo streamingโ ads
38The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
We identified four main features related to video streaming ads
(1) Offering rewarded video ads
(2) Adding video control
(3) Handing native video ads
(4) Prefetching video ads
39. A longitudinal study of popular ad libraries
39The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
RQ1: How often are ad libraries released, and how large are
these releases?
RQ2: What drives ad library developers to release a new
version?
RQ3: How did the architecture of ad libraries evolve over
time?
40. We derive the reference architecture of ad libraries
40The evolution of ad libraries (major revision in EMSE)2Ad library integration practices1
Generating a
conceptual
architecture
of each
studied ad
library
Generating a
concrete
architecture
of each
studied ad
library
Refining the
conceptual
architecture
of each
studied ad
library
Deriving the
reference
architecture
of ad libraries
42. Over time, the studied ad libraries converged
towards our derived reference architecture
42
๏ Ad libraries added many new components during our study period
๏ For example, the Vungle ad library added 3 new components
โข A mediation component
โข A native video ads component
โข An interactive ad component
43. Take-home: (1) ad libraries are actively evolving, and
(2) the reference architecture of ad libraries can
serve as a template for creating a new or evolving an
existing ad library
43