Stay organized with collections
Save and categorize content based on your preferences.
Every data point in Google Fit has an associated data source. Data sources contain
information to identify the app or the device that collects or transforms the data.
The REST API lets you determine which app inserted fitness data.
For example, an app that analyzes a variety of data from the user's fitness history may
want to present users with the list of fitness sessions included in the analysis, along with
information about which app inserted each session.
The REST API also lets you associate data that you insert in the fitness store with your
application.
Determine which application inserted data
To obtain the package name of the Android application that inserted a session or
the name of the REST application that inserted a session:
When you list all available sessions for a time interval in your application, you can
use this information to show your users which app inserted each session.
Provide information about your application
To attribute data you insert into the fitness store to your application, ensure that:
You add your application details to the
dataSources.application property when
creating data sources.
You specify the correct
datasets.dataSourceId for your data source
when adding points to datasets.
Applications accessing data you inserted can use this information to attribute that data to your
application.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eEvery data point in Google Fit is linked to a data source, which identifies the source app or device.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Fit REST API allows you to identify the app that inserted specific fitness data, like sessions or datasets.\u003c/p\u003e\n"],["\u003cp\u003eYou can attribute data you insert into Google Fit to your application by including application details when creating data sources.\u003c/p\u003e\n"],["\u003cp\u003eThis attribution allows other apps to correctly identify your application as the source of the data.\u003c/p\u003e\n"]]],[],null,["# Data Attribution\n\nEvery data point in Google Fit has an associated data source. Data sources contain\ninformation to identify the app or the device that collects or transforms the data.\n\nThe REST API lets you determine which app inserted fitness data.\nFor example, an app that analyzes a variety of data from the user's fitness history may\nwant to present users with the list of fitness sessions included in the analysis, along with\ninformation about which app inserted each session.\n\nThe REST API also lets you associate data that you insert in the fitness store with your\napplication.\n\nDetermine which application inserted data\n-----------------------------------------\n\nTo obtain the package name of the Android application that inserted a session or\nthe name of the REST application that inserted a session:\n\n1. Retrieve the session.\n2. Read the [`session.application.packageName`](/fit/rest/v1/reference/users/sessions/list#session.application.packageName) or [`session.application.name`](/fit/rest/v1/reference/users/sessions/list#session.application.name) property.\n\nTo obtain the package name of the Android application or\nthe name of the REST application that inserted a dataset:\n\n1. Retrieve the dataset.\n2. Retrieve the data source by reading the [`dataset.dataSourceId`](/fit/rest/v1/reference/users/dataSources/datasets#dataSourceId) property.\n3. Read the [`dataSources.application.packageName`](/fit/rest/v1/reference/users/dataSources#application.packageName) or [`dataSources.application.name`](/fit/rest/v1/reference/users/dataSources#application.name) property.\n\nThe `application` property contains these fields:\n\n`name`\n: The name of the application.\n\n`packageName`\n: The package name of the Android application.\n\n`detailsUrl`\n: (Optional) A URI to link to the application.\n\nWhen you list all available sessions for a time interval in your application, you can\nuse this information to show your users which app inserted each session.\n\nProvide information about your application\n------------------------------------------\n\nTo attribute data you insert into the fitness store to your application, ensure that:\n\n- You add your application details to the [`dataSources.application`](/fit/rest/v1/reference/users/dataSources#application) property when creating data sources.\n- You specify the correct [`datasets.dataSourceId`](/fit/rest/v1/reference/users/dataSources/datasets) for your data source when adding points to datasets.\n\nApplications accessing data you inserted can use this information to attribute that data to your\napplication."]]