Studying the Integration Practices and the
Evolution of Ad Libraries in the Google Play Store
Md Ahasanuzzaman
Supervisor: Prof. Ahmed E. Hassan
95% of 12.7 million of the Google Play Store
apps are free-to-download
2
Google Play Store
3
App developers earn revenue through an
in-app advertising model
display
earn
Ads
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
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
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.]
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.]
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
Prior work does not examine the integration of ad
libraries and their evolution
App Ad libraries
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
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]
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
Examples of the 63 identified ad libraries
13Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
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
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
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
=
# 𝑜𝑓 𝑎𝑝𝑝𝑠 𝑤𝑖𝑡ℎ 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑒 𝑎𝑑 𝑙𝑖𝑏𝑟𝑎𝑖𝑟𝑒𝑠
# 𝑜𝑓 𝑎𝑝𝑝𝑠 𝑤𝑖𝑡ℎ 𝑎 𝑠𝑖𝑛𝑔𝑙𝑒 𝑎𝑑 𝑙𝑖𝑏𝑟𝑎𝑟𝑦
17
Challenge: How to manage multiple ad libraries?
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
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
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
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
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
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
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
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]
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
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
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?
The studied ad libraries had a median release
interval of approximately one month
29
81 67
37 34 30 30 23 2134
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
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?
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
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
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. ”
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
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
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
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
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?
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
41
Our derived reference architecture of ad libraries
consists of five main components
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
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
44

Studying the Integration Practices and the Evolution of Ad Libraries in the Google Play Store

  • 1.
    Studying the IntegrationPractices and the Evolution of Ad Libraries in the Google Play Store Md Ahasanuzzaman Supervisor: Prof. Ahmed E. Hassan
  • 2.
    95% of 12.7million of the Google Play Store apps are free-to-download 2 Google Play Store
  • 3.
    3 App developers earnrevenue through an in-app advertising model display earn Ads
  • 4.
    Ads are displayedin 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 considersthree 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 literatureconsiders 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 literatureconsiders 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 literatureconsiders 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 doesnot examine the integration of ad libraries and their evolution App Ad libraries
  • 10.
    Thesis statement 10 Studying theintegration 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 adlibraries 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 howapp 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 the63 identified ad libraries 13Ad library integration practices (under review in TSE)1 The evolution of ad libraries2
  • 14.
    Ad libraries arenot 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 integratemultiple 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 alarge 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 = # 𝑜𝑓 𝑎𝑝𝑝𝑠 𝑤𝑖𝑡ℎ 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑒 𝑎𝑑 𝑙𝑖𝑏𝑟𝑎𝑖𝑟𝑒𝑠 # 𝑜𝑓 𝑎𝑝𝑝𝑠 𝑤𝑖𝑡ℎ 𝑎 𝑠𝑖𝑛𝑔𝑙𝑒 𝑎𝑑 𝑙𝑖𝑏𝑟𝑎𝑟𝑦
  • 17.
    17 Challenge: How tomanage multiple ad libraries?
  • 18.
    18Ad library integrationpractices (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 commonstrategies 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 commonstrategies 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 commonstrategies 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 commonstrategies 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 availableexternal-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 integrationpractices (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 adlibraries 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 thetop 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 ofad libraries (major revision in EMSE)2Ad library integration practices1 We selected 8 popular ad libraries for our study mobile ad network
  • 28.
    A longitudinal studyof 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 adlibraries had a median release interval of approximately one month 29 81 67 37 34 30 30 23 2134
  • 30.
    We identified 4trends 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 studyof 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 analyzedrelease 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 developersare 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 developersare 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 occurringdriver 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 occurringdriver 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 occurringdriver 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 occurringdriver 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 studyof 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 thereference 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
  • 41.
    41 Our derived referencearchitecture of ad libraries consists of five main components
  • 42.
    Over time, thestudied 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) adlibraries 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
  • 44.