Unique Devices dataset (v1) as developed and maintained by the Wikimedia Foundation since January 1st, 2016. This data set contains the number of unique devices having visited Wikipedia or its sisters project over some period of time. The Analytics team counts unique devices per project per day and month in a way that does not uniquely identify, fingerprint or otherwise track users.

wx_unique_devices(
  project,
  access_site = c("all", "desktop", "mobile"),
  granularity = c("daily", "monthly"),
  start_date = "20191101",
  end_date = "20191231"
)

Arguments

project

The name of any Wikimedia project formatted like {language code}.{project name}, for example en.wikipedia. You may pass en.wikipedia.org and the .org will be stripped off. For projects like Wikimedia Commons (without language codes), use commons.wikimedia. For projects like www.mediawiki.org, you can use that full string, or just use mediawiki or mediawiki.org.

access_site

If you want to filter by accessed site, use "desktop" or "mobile". If you are interested in unique devices regardless of accessed site, use "all" (default). NOT to be confused with access_method parameter in other functions.

granularity

The time unit for the response data. As of today, supported values are daily (default) and monthly.

start_date

The date of the first day to include, in YYYYMMDD format. Can also be a Date or a POSIXt object, which will be auto-formatted.

end_date

The date of the last day to include, in YYYYMMDD format. Can also be a Date or a POSIXt object, which will be auto-formatted.

Value

A tibble data frame with the following columns:

project

project

date

Date; beginning of each month if granularity = "monthly"

devices

Estimated number of unique devices.

offset

The number added to underestimate to produce devices estimate.

underestimate

The count produced by WMF-Last-Access cookie counting, which, by definition, underreports users as we will not be counting users with a fresh session or users browsing without cookies.

Site

Desktop devices can (and do) access the mobile website, usually because the user clicked on a link shared by a user from a mobile device. So do not use this metric as a proxy for mobile vs desktop devices.

To learn more about how mobile traffic is handled by Wikimedia, refer to mw:Reading/Web/Mobile.

License

Data retrieved from the API endpoint is available under the CC0 1.0 license.

See also

Examples

wx_unique_devices("en.wikipedia", access_site = "mobile", granularity = "monthly")
#> # A tibble: 2 x 5 #> project date devices offset underestimate #> <chr> <date> <int> <int> <int> #> 1 en.wikipedia 2019-11-01 686790689 201152886 485637803 #> 2 en.wikipedia 2019-12-01 630376091 215733588 414642503