Chrome Media History Tracking Your Viewing Habits

As of Chrome version 86, Google introduced a new database to keep track of your video viewing called Media History. It can be located in the Default folder path for Chrome:

Windows:

C:\Users\<USERNAME>\App Data\Local\Google\Chrome\User Data\Default\Media History

Android:

data\data\com.android.chrome\app_chrome\Default\Media History

**Note: Edge and sBrowser both use Chromium as well so this artifact should reside in their respective folders**

Ryan Benson has a great post on some of his testing for Media History on the the desktop version of Chrome. This post is to compliment his research as well as expand it to the Android version of Chrome (spoiler alert: it's the same database structure!).

One cool thing I found is that Chrome actually tracks most of this in a hidden setting. If you navigate to "chrome://media-history" you can actually see your own easily and verify your results as well. The three tabs that are found are as follows:

  • Origins
  • Playbacks
  • Sessions
Opening the Media History database file in DB Browser for SQLite we can see these tabs directly correlate to tables.

Figure 1: Media History tables in DB Browser

Let's take a look at each tab and correlating table and see what it looks like.

Origins (origin)

The list of domains that feed the other tables with aggregated watch times

  • ID (id)
    • Unique number assigned to each entry
  • Origin (origin)
    • URL domain of the website
  • Last Updated (last_updated_time_s)
    • last time a media item has been played from each domain
    • Webkit format in seconds instead of microseconds
  • Audio + Video Watchtime (aggregate_watchtime_audio_video_s)
    • Total watch time in seconds from each domain
The following columns were trimmed out for null results:
  • has_media_engagement
  • media_engagement_visits
  • media_engagement_playbacks
  • media_engagement_last_playback_time
  • media_engagement_has_high_score

Playbacks (playback)

The playbacks table stores playbacks that happened on a page. These can be of any type and there is one playback stored for each player per page

  • ID (id)
    • Unique number assigned to each entry
  • Origin ID (origin_id)
    • Matches the proper domain ID from the Origins table
  • URL (url)
    • URL the media was played from
  • Last Updated (last_updated_time_s)
    • last time a media item has been played from each domain
    • Webkit format in seconds instead of microseconds
  • Has Audio (has_audio)
    • If the media had audio
  • Has Video (has_video)
    • If the media had video
  • Watchtime (watch_time_s)
    • length of time the user played the media

Sessions (playbackSession)

The sessions table stores media sessions that had media playback that had both an audio and video track. There is only one session recorded for the lifetime of the page.

  • ID (id)
    • Unique number assigned to each entry
  • Origin ID (origin_id)
    • Matches the proper domain ID from the Origins table
  • URL (url)
    • URL the media was played from
  • Last Updated (last_updated_time_s)
    • last time a media item has been played from each domain
    • Webkit format in seconds instead of microseconds
  • Position (position_ms)
    • position of media item when the entry was last updated
    • appears to be last position after leaving the page
  • Duration (duration_ms)
    • Total duration of the media item in milliseconds
  • Title (title)
    • title of the media item
  • Artist (artist)
    • artist of the media item
    • YouTube shows the channel name
  • Album (album)
    • album of the media item
    • appears blank on all my test data
  • Source Title (source_title)
    • base domain the media item came from

Parsers have been added to ALEAPP. The underlying queries can be used to work with parsing the Media History database of the desktop version of Chrome/Chromium based browsers (ex. Edge) too. You can download the queries from my Github repository as well. KAPE has been updated to pull the database in the Chrome target as well as Magnet AXIOM custom artifacts pending.