How to install the OrangeStats Sheet for Strava Statistics
OrangeStats works with Google Sheets, so the first thing you have to do, if you do not have a gmail account, create one. It is free and only takes a minute.
https://accounts.google.com/signup/v2/webcreateaccount?hl=en&flowName=GlifWebSignIn&flowEntry=SignUp
If you have created one, or you already have one, we can go to the next step.
Open de sheet you got from OrangeStats, it is a View only copy, so you need to make a copy to make it your own.
Give it a name "OrangeStats YourName".
So now you have your own copy. Close both the original and your copy.
First we get the the information from Strava and Weather Site.
First we get the the information from Strava and Weather Site.
After that, when you have the the Weather API and the Code's from Strava, we re-open the copy (your sheet version) again.
Wethear API
So we need to activate 2 API's. First the weather API. As OrangeStats is combining weather data and Strava data, we need to obtain the weather API key :
- The weather webpage we use is : https://auth.meteostat.net/
- Fill in your data, check carefully your mail address
- You will receive an important Email
- Check your mail
- In this mail 2 important things:
- the key itself
- and the link to confirm the mail, please click this link:
Strava API
The next part is about the integration of the Strava API. Remember all we do is integrate your google sheet with your Strava data. We are not sharing with any other parties, it is all about you!
Login to Strava and go to Settings > My API Application or click on the following URL :
Fill in the data to create the integration.
Type (carefully) in the field Authorization Callback Domain the following value: script.google.com
Type (carefully) in the field Authorization Callback Domain the following value: script.google.com
And in field Website you type: https://indoorcyclingexperience.blogspot.com
Next step in Strava is to add a picture/logo. You can upload any pictue you want.
Now the Strava API is configured. Strava will show the API information with 2 important keys we need later:
- Client ID
- Client Secret
Keep this page open (or copy the 2 keys) and switch back to your google sheet.
Re-open you OrangeSheet, you can find it under sheets :
You need to authorize the google script to execute in your own sheet :
(if you get this message go to step 2)
STEP 1. Do you see at the top the OrangeStats menu, like in the picture below?
| Bijschrift toevoegen |
If Yes : Click on Google Authorization and scroll to STEP 2 on this page.
If not, close the sheet and re-open it again.
If you still do no see it, open de script-editor and do the following:
--> So only do the following, if you do not see the OrangeStats menu on top
- go to script editor :
- select on the left Code.gs
- select the function OnOpen and click the run button as shown in example below :
STEP 2.
After click on the run button (see above) OR you select in the OrangeStats menu Google Authorization
Click "Review permissions", Choose your gMail account and follow the process like the pictures below :
So we now we see the menu 'OrangeStats' on top and Google has authorization to run the script:
STEP 3.
- Click in the OrangeStats menu on 'Initial setup'
- OrangeStats will ask for
- Your weight, enter a whole number in KiloGrams
- OrangeStats will ask for your mail address
- Your 2 Strava keys : Client ID and Secret ID
- The weather API Key
Final step is to authorize Strava, click onthe link, it will redirect you to Strava.
The Strava Connection page, click on 'Allow' :
So the connection with Strava is ok now.
(you can close this page)
Step 4
Stay (or go back again) in the Sheet and in the OrangeStats menu, click on "Initiate/Restart Strava Data retrieval"
| Bijschrift toevoegen |
OrangeStats will try to import the Strava data and the weather data into the sheet. This will happen in small packets, so it may take several hours before everything is in. No need to keep the sheet open, you can close it, if you want to, the update will continue in the background. On the Intro page you can follow the progress.
And remember...from now on OrangeStats will keep everything in sync in the background so need to do anything anymore like update data, logins, syncs, API keys etc.
That's it.... succes !
Comments
Post a Comment