Google Fit Rest Api Step Counts inconsistent and different from Fit App - rest

This seems to be a common enough problem that there are a lot of entries when one googles for help but nothing has helped me yet.
I am finding that the results provided by the REST API for estimated_steps are wildly different from those that appear in the device app.
I am running a fetch task for users via cron job on a PHP/Laravel app.
I'm using this https://developers.google.com/fit/scenarios/read-daily-step-total - estimated_steps to retrieve the step count.
Some days the data is correct. Some days its wildly different. For instance, on one given day, the REST API gives step count of 5661 while the app shows 11,108. Then there are six seven days when the stream is correct.
Has anyone faced this sort of behavior? I've tested for timezone differences, logged and analyzed the response json to see if i'm making some obvious mistake, but nope.

You may check this How do I get the same step count as the Google Fit app? documentation. Be noted that even when using the right data source, your step count may still be different from that of the Google Fit app.
This could be due to one of the following reasons:
On Wear, the Fit MicroApp when connected will display step counts queried on the phone and transferred over via the Wearable APIs. Other MicroApps accessing local-only data will only get watch steps. We are working on making this easier for developers.
Sometimes the step calculation code for the Google Fit app is updated with bug fixes before we are able to release the fixes to developers (which requires a Google Play Services release). We are also working on making it possible for developers to access fixes at the same time.
The Fit app uses a specific data source for steps and it adds some functionality (which can be seen on the documentation) on top of the default merged steps stream.
You can access the "estimated" steps stream as shown here:
derived:com.google.step_count.delta:com.google.android.gms:estimated_steps
Hope this helps!

Related

Dynatrace API - pull pure path information

We are using Dynatrace in our organization for a long time. It is really a great tool for pointing out pain areas in case of performance and knowing what's happening in the system. However we found that reporting is not great. In our setup, data gets wiped-off in 20 days for non-PRD environment. It also looses all the details. To keep a track of underlying calls currently we need to take a screen shot of put the data manually in excel file. This helps us in comparing old results with latest development/ improvement.
We were wondering if there is any Dynatrace API available which can push the pure path information in JSON format. We checked Dynatrace API page. But there is none. Creating excel files manually is waste of time. There is no value addition. Has anyone else found any work around for this?
e.g. for the image we want to have JSON having list of underlying DB calls shown under controller, their start-end time, time consumed details, etc..
Please help

Google Analytics 4 (GA4) - Analytics Data API - When will this be out of Alpha, Beta?

Based on the Analytics Data API Banner ("Keep in mind that these APIs are pre-release and subject to change. Code built using these APIs should not be pushed to production. While we will try to notify you of upcoming changes, you should expect to encounter breaking changes before the APIs are publicly released."), the APIs are pre-release and subject to change.
https://developers.google.com/analytics/trusted-testing/analytics-data
When is the Analytics Data API expected to be out of Alpha?
When is it expected to be out of Beta?
Is this timeline a few months, a few quarters, or will it take a year or more to stabilize and publish?
Followup question, if this is going to take some time to move out of Alpha / Beta, do you expect to allow "App+Web" upgrades to downgrade back to "Universal Analytics"?
I have also sent an email to the address in the documentation with no response.
Thanks!
Brie,
I don't believe there is a public timeline on the API release cycle, but we hope to move on to Beta fairly soon. As for your second question, it is not possible to downgrade GA4 (formely App+Web) properties back to "Universal Analytics", as they are fundamentally different.
Thanks,
Ilya
The Google Analytics Team
I imagine most developers are waiting until the official release of the API before incorporating it into their workflows. But I would recommend that we all spend some time testing the API and provide feedback to Google. That way we can point out any issues and suggest features that will be of value.
For example, I want to pull up to 50+ dimensions and metrics but the API limits runReport requests to 9 dimensions and 10 metrics. I doubt Google will budge on those quotas so I figured I'd run multiple queries and merge them programmatically. Unfortunately, that's not a viable approach since there is no universal key/column available to effectively join data across those queries.
However, if the Google Analytics session id were a dimension it could serve as that universal column. So I made an entry under the Google Analytics Issue tracker requesting just that (feel free to star Issue#: 188980721).
So get involved, the sooner we do and vocalize our needs (especially at this stage of development) the more likely the API will meet those goals.

Some users have no data sources but have data in Google Fit app [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
My team has published an app that retrieves users' Google Fit data using the REST API to display how active they are and grade their fitness level. I'm interested in the steps and active_minutes metrics.
About 50% of our users have either no data sources or limited data sources. Some of these users are on my team and I have verified they have accepted the required scopes and that the Fit app is indeed recording data.
To test users, I am refreshing their access token (which works fine) and then calling this endpoint to retrieve a list of available data sources:
GET fitness/v1/users/me/dataSources (https://developers.google.com/fit/rest/v1/reference/users/dataSources/list)
Sometimes the datasources will be an empty array, and sometimes it will have a very limited number of data sources (ex. data sources involving calories, but not steps, even though steps are showing up just fine in Fit).
I am requesting the following scopes:
fitness.activity.read
fitness.body.write
The other 50% of our users work just fine and I am completely stumped at what is different about the users that appear to have no (or limited) data sources.
I found that some users had syncing disabled for Google Fit. To enable syncing you must go into the Settings app of your Android phone:
Settings -> Accounts -> Select your Google account being used for Google Fit -> Ensure that Google Fit is enabled for syncing.
This answers the most puzzling case where we had users with some data sources, but not all of the expected data sources such as estimated steps. I presume the limited data sources available were from a short time period before syncing was disabled, or while the user was using an outdated version of Google Fit. I'm also finding users with more obvious problems, like using OAuth with a Google account different than the one connected to Google Fit.

GAPI Class, Google Analytics API

I am about to start a new project in the Google Analytics API & PHP.
I read that Google Analytics will be deprecating XML v2.3 and v2.4 and in 6 months time, so aparently you will only be able to use v3 and retrieve information in JSON format.
http://analytics.blogspot.com/2011/12/introducing-google-analytics-core.html
My question is the following: Does this means that GAPI class won't work any longer? Anyone who has used this class before can help me answering this question ??
http://code.google.com/p/google-api-php-client/
In that case, any alternative suggestions of PHP classes that do the same thing.
Thanks so much
I've been using GAPI for a while now. And I can say with some confidence that yes it will break, if not due to XML it will be due to some other change google makes.
Having said that GAPI is the best solution I have found out there for php. It does break every 6 months to a year, usually needs one or two lines changing to fix. But GAPI is pretty popular so at least you know when your clients are calling saying analytics is throwing errors at them, you wont be the only dev tearing your hair out.
9 times out of 10, by the time I've got a problem someone else has found the fix - which is nice.
There are a few other php options out there but GAPI seems to be the most popular (usually the best way to go imho)
My approach is to build an analytics summary in the dashboard and provide a link to google analytics underneath so clients can see the full data or go there when GAPI breaks. I have been putting all my sites on the same modular system for a while now. I keep GAPI as a library in my admin layout module, this means I can make the fix once and roll it out to all my sites without too much drama.
In summary, use it but expect it to break - that way you wont be disappointed when it does.

How can I learn which devices/OS versions my iOS app is being run on?

I understand that apple no longer allows me to send "device data" to third-party services. As a result of this, Flurry and presumably every other analytics company no longer collects OS/hardware version data. However, this data is very valuable to anyone trying to target development toward the people who are actually using the apps.
I can imagine a few different ways to collect this data.
1) Send a custom event indicating the hardware/os version to Flurry. This, of course, is in direct violation of the agreement with Apple. However, I suspect plenty of people are doing this, and just not getting busted. Still, not an ideal solution. Even if Apple didn't notice that we were sending this data, I'd rather not have the possibility of the app getting pulled hanging over my head.
2) Use an analytics package which allows me to collect data on my own server. Localytics is one company which seems to offer this. However, I don't think they offer this with their free plan. Is anyone aware of any free (or cheap) analytics tools which will allow me to send data to my own server?
3) Roll my own solution. This could either be an entire replacement for Flurry, or I could continue to use flurry, but send only the device data to my own server. This is a little clunky. I'd much rather have all my analytics data in one place. And would much rather not have to deal with building my own tool if I don't have to
So, is anyone else collecting device data? Are you using one of the above techniques? Or maybe something different I hadn't thought of?
Hi maybe "Testflight Live" could help you.
As far as I know Testflight is allowed by Apple.
https://testflightapp.com/sdk/live/
I've heard of people using UIWebViews to connect to a webpage with a counter. The counter is incremented each time a page is accessed, and the pages are separated by feature/UIView. This way the developer can tell which features get the most usage.
As far as device data, you most likely are looking at rolling your own tracking mechanism, probably going through a server like Google App Engine that's set up to receive your data.
I made this an answer so I could continue to check back, because I'd like to know some more info as well. I voted up your question and favorited it
Good luck, sir