Strava Privacy Zones & Activity API

149 views
Skip to first unread message

Michael Wood

unread,
Oct 17, 2019, 12:32:41 AM10/17/19
to Strava API
Does anyone know if the summary poly line associated with an activity (returned via Strava api) respects the privacy zones that user has created?

Mark Stubbs

unread,
Oct 17, 2019, 4:47:13 AM10/17/19
to Strava API
Hi Michael,
Just speaking anecdotally, they do appear to.

One section of my app aggregates a bunch of activity polylines onto a map from the "https://www.strava.com/api/v3/athlete/activities?" endpoint, and what I've observed is that my own privacy zone appears as a black hole.

Not trying to promote my own app here, but if you want to have a look at your own privacy zone on my app, it's at:

https://www.stattracker.x10host.com/

Cheers
Mark


Michael Wood

unread,
Oct 18, 2019, 11:56:02 AM10/18/19
to Strava API
Mark, can you confirm you use the summary or detailed poly line for your heat map? BTW, I like your app!

Mark Stubbs

unread,
Oct 18, 2019, 10:33:12 PM10/18/19
to Strava API
Hi Michael, Thanks for the compliment!  
Confirming that I only use the summary_polyline. 
Also worth mentioning is that I use scope "activity:read_all" as long as the user authorises it, so it should be getting all private data.

One thing I have very recently noticed, however, is that the polylines appear to respect the privacy zone only for the first/last bit of the activity and only when the user starts and/or finishes the activity within the privacy zone.

example screenshot shows my own privacy zone where you can clearly see activities being "cut" at certain points, however, on one activity (the blue line) I have gone through my privacy zone 10 minutes after I started riding and it doesn't get cut.

privacy_zone.png


Weird, huh?

Bryant Likes

unread,
Oct 18, 2019, 10:53:36 PM10/18/19
to Mark Stubbs, Strava API
I think that is the point of the privacy zones, to hide the start and ends only. If it blocked out in the middle then it would be easier for people to figure out where your privacy zones are.

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/bd5f917d-f1a7-420e-b33f-7282e147340a%40googlegroups.com.

Michael Wood

unread,
Oct 18, 2019, 10:59:09 PM10/18/19
to Mark Stubbs, Strava API
Interesting.  Thanks for the heads up.

I did a test today where I changed my privacy zone to make it larger and the summary line did not change when I resynchronized an existing activity.  I'm going to test a new activity tomorrow.  I'll let you know how it goes.

Thanks again for your help!

On Fri, Oct 18, 2019, 7:33 PM Mark Stubbs <stubby...@gmail.com> wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "Strava API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/strava-api/LU8O5zQUIfo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to strava-api+...@googlegroups.com.

Bryant Likes

unread,
Oct 18, 2019, 11:02:06 PM10/18/19
to Michael Wood, Mark Stubbs, Strava API

You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/CA%2BnbOFoodF%3DEzvOA4ZzX6UVdSkK1k%2BUcp_x7m%3DZrR8T3CWNs%2BQ%40mail.gmail.com.

Michael Wood

unread,
Oct 18, 2019, 11:05:17 PM10/18/19
to Bryant Likes, Mark Stubbs, Strava API
Excellent point!

You received this message because you are subscribed to a topic in the Google Groups "Strava API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/strava-api/LU8O5zQUIfo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/CANoWhT3a0_vdB0zK7a7AumMhE3EqBOzbtScNOm035022bOxpGA%40mail.gmail.com.

Mark Stubbs

unread,
Oct 18, 2019, 11:26:00 PM10/18/19
to Strava API
Good point, Bryant and thanks for the info.  It's actually pretty cool that it works that way - I just didn't realise that it did until I rode past my street the other day!


On Saturday, October 19, 2019 at 2:02:06 PM UTC+11, Bryant Likes wrote:
On Fri, Oct 18, 2019, 7:59 PM Michael Wood <wood...@gmail.com> wrote:
Interesting.  Thanks for the heads up.

I did a test today where I changed my privacy zone to make it larger and the summary line did not change when I resynchronized an existing activity.  I'm going to test a new activity tomorrow.  I'll let you know how it goes.

Thanks again for your help!

On Fri, Oct 18, 2019, 7:33 PM Mark Stubbs <stubby...@gmail.com> wrote:
Hi Michael, Thanks for the compliment!  
Confirming that I only use the summary_polyline. 
Also worth mentioning is that I use scope "activity:read_all" as long as the user authorises it, so it should be getting all private data.

One thing I have very recently noticed, however, is that the polylines appear to respect the privacy zone only for the first/last bit of the activity and only when the user starts and/or finishes the activity within the privacy zone.

example screenshot shows my own privacy zone where you can clearly see activities being "cut" at certain points, however, on one activity (the blue line) I have gone through my privacy zone 10 minutes after I started riding and it doesn't get cut.

privacy_zone.png


Weird, huh?


On Saturday, October 19, 2019 at 2:56:02 AM UTC+11, Michael Wood wrote:
Mark, can you confirm you use the summary or detailed poly line for your heat map?  BTW, I like your app!

--
You received this message because you are subscribed to a topic in the Google Groups "Strava API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/strava-api/LU8O5zQUIfo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to strav...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strav...@googlegroups.com.

Michael Wood

unread,
Oct 25, 2019, 9:40:10 PM10/25/19
to Mark Stubbs, Strava API
Quick update.  We confirmed the Strava API does honor the users privacy zones.  I edited mine to make it larger and new activities synced had polylines (both summary and detail), that reflects the new zone.  Caveat is new syncs of legacy activities don’t change. It must do these calculations on their original pipelines at initial sync...

Thanks for the input gents!

To unsubscribe from this group and all its topics, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/a888fa8a-9288-4d58-a7e4-64123ceb3a41%40googlegroups.com.

Mark Stubbs

unread,
Oct 31, 2019, 10:03:48 PM10/31/19
to Strava API
Nice work Michael, good to know that.
Aside from privacy zones but still on polylines, I wonder what happens when you crop your activity after upload?

I'm guessing that would be a totally different scenario and the polyline would recalculate, but I might try that out just to confirm

Michael Wood

unread,
Oct 31, 2019, 11:46:21 PM10/31/19
to Mark Stubbs, Strava API
Thanks Mark. Our experience is the privacy zones are enforced during the initial sync to Strava. I couldn't get them to change an activity when I edited one but perhaps clipping on their end triggers the reassessment against whatever zones are at that time. Please let us know what you find.

Cheers, Mike
--
You received this message because you are subscribed to a topic in the Google Groups "Strava API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/strava-api/LU8O5zQUIfo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/0384debf-6ecd-4f2f-a54f-7c47ff592da0%40googlegroups.com.

Mark Stubbs

unread,
Nov 1, 2019, 12:49:29 AM11/1/19
to Strava API
Yep, cropping an activity creates a new polyline

I suppose it would be a big ask of Strava to asses and recalculate the polylines of every single activity when the privacy zone is edited.

Hope it doesn't create grumpy users for them though.

Reply all
Reply to author
Forward
0 new messages