What do you need to know?

Use the search box below to type keywords and get instant results ...

Step by Step – Add Strava Import For Your Virtual Run Results

In the troubled times of the 2020 Coronavirus Pandemic, the virtual run has become an important back up plan for event organisers who are unable to hold their traditional event due to social distancing restrictions. Not only that – virtual runs are actually pretty fun! They don’t cost much to produce and can help to keep your participants engaged with your brand in between events.

Setting up registration for a virtual run is just like registering for a normal run. However, using Director tools, you can provide an online results platform for your virtual run, which greatly increases engagement in the process. Once you have created your results competitions, you can manually input finish times to build your results list.

Strava

Another option for getting results into your virtual run is using the Strava API via Director. This means your participants can do the heavy lifting for you – recording their workout on Strava and then importing it into Director – and also gives them the satisfaction of immediate feedback as their result is instantly calibrated for distance, added to the official results and ranked.

There are three steps to enable the Strava Results Import:

Step One: Create an App on Strava

Sounds difficult and technical, but it’s actually very easy to do! If you don’t already have a Strava account of your own, you’ll need to set one up. Once you are logged in to Strava …

  1. Go to https://www.strava.com/settings/api and create an app. The important fields are:
    • Category: choose “Other”
    • Web Site: this is your own business or event web site
    • Application Description: this is shown to entrants when they are authorising your app so choose it carefully. Something like “Provide results for virtual run event.”
    • Authorizatoin Callback Domain: this is the most important field of all. It has to be set to the domain of your public facing Director site. If your event registrations URL are something like “https://public.myevent.com/register/?id=event2020” then the callback domain would be public.myevent.com.
  2. Once you have created your app, the page will refresh and you’ll have access to the Client ID and Client Secret fields. You’ll need both of these for the next step.

Step Two: Create an API on Director

  1. Log on to Director.
  2. Go to Setup > APIs
  3. Click Add New button
  4. In the popup:
    • API Name: Strava
    • API Type: Strava
    • Key: copy the Client ID from your Strava app
    • Secret: copy the Client Secret from your Strava app
    • URL: set this to https://www.strava.com/api/v3
    • Parameter #1: set this to http://www.strava.com/oauth/authorize
    • Active? ensure this is set ON
    • Click the Add button

Step Three: Add the API to each Competition

  1. Go to Results > Results Dashboard. Ensure your virtual event is active.
  2. On the Competitions tab, you’ll see the competitions for your event listed. If you don’t have any yet, this is where you can create them.
  3. Click the Edit icon next to each competition that you want to allow Strava import for.
  4. In the popup editor, you’ll see a section dedicated to Virtual Event Parameters. This is where you can enable the Strava API link and also control what can and what cannot be used as a valid time for your event.
  5. Set the fields as follows:
    • API: select the Strava API you just created
    • Eligible Activities: this is the list of activity types on Strava that you will accept for results. For a running/walking event, we’d suggest “run,walk,hike“. Use a comma between each type and leave no spaces.
    • Import Available (days): this is the number of days you will allow the import function to be available after the start date/time of your competition. We suggest 3 as a reasonable compromise.
    • Distance Tolerance (km): Use the “Below” and “Above” fields to calculate a distance tolerance. This will be calculated relative to the Competition Distance (which, if you haven’t already set it, can be set a few fields above). As an example. If you are having a virtual half marathon then the competition distance will be 21.1km. If you wanted to allow any workout activity between 20km and 25km, then set “below” to 1.1 and “above” to 3.9.
      Important! Director will automatically adjust the workout time when importing to match the competition distance.
    • Start Time Tolerance (km): The exact start time of your competition is calculated based on the event date and the Gun Time (see Gun Times tab on Results Dashboard). The start time tolerances allow you to control which workouts are acceptable for your virtual run based on the actual start time recorded on the Strava activity. If you have a gun time for Sunday at 9am and you want to allow activities recorded any time on Sunday, set the “Before” tolerance to 9 and the above tolerance to 15. If you wanted to allow any activity recorded throughout the weekend, the before tolerance would be 9 + 24 = 33 (hrs).

Step Four: Add “FINISH” Timing Point to each Competition

  1. Go to Timing -> Timing Points
  2. There is one tab on this page for each Competition.
  3. Click the Add New button at the top, once for each Competition:
    • Select the competition in the drop down list
    • Name = “FINISH
    • ShortCode = “FINISH”
    • Display Sequence = 1
    • Type = “Finish” (this is the most critical element)
    • Distance From Start = complete this if you want to. For a 10km race, it is simply “10”

Setup Complete: What’s Next?

With all that done, it’s now up to your participants to log their times. They do this by accessing the Dashboard application (the same app they use to view and modify their registrations). In Dashboard, they choose “My Results” from the menu. The virtual run should appear on the list. When they click the view icon, they will get to the results detail page for the virtual run.

When they are on the detail page, the “Strava Import” button will appear at the top during the available upload period. The upload period begins at the time calculated as the minimum from the start time tolerance settings (so if you wanted to test it was working a few days before the event, you can set the start time tolerance hours to a very high number so it includes the current date). The upload period ends based on the last acceptable start time using the start time tolerance, with the number of days specifed in Import Available fields.

As an example, let’s say you have set your tolerances so that any workout recorded on Saturday or Sunday of race weekend is acceptable and the Import Available is set to 3 days. The Strava Import button will be available from 00:00:01 Saturday until 23:59:59 on Wednesday night.

Job done!