Widgets

Our Widgets allows you to quickly embed myWindsock metrics for a course onto a web page.

Quick Start

Ensure you have applied and have received an apikey, apply here.

CSS File

<link href="https://mywindsock.com/api/widgets/css/metrics.css" rel="stylesheet" />

Placement

<div class="tt-ctt-mws mws-metric"  data-mws-source="REPLACE" data-mws-metric="REPLACE" data-mws-id="REPLACE"></div>

JS Code

<script type="text/javascript">
    var mws_apikey='REPLACE WITH APIKEY';
</script>
<script type='text/javascript' src='https://mywindsock.com/api/widgets/js/load.js'></script>

Parameters

data-mws-source

Select the course data source. You have the following options:

  • strava_segment
  • strava_route
  • strava_activity
  • rwgps_route
  • komoot_route
  • upload
  • course
  • ctt

data-mws-id

The unique course ID for the applicable data source. For example, Strava Segment would have the strava_segment data-mws-source and the data-mws-id is the numeric value within a Strava Segment URL https://strava.com/segments/1078016/

data-mws-metric

The data can be presented:

data-mws-timestamp

Optional, a UTC timestamp for the start time of the analysis. If this is not provided the current time will be used.