Stats FC

Score Predictor

Here you'll find sample code and an example of our Score Predictor widget. The widget comes with it's own CSS, and is fully customisable.

This widget is also available as a WordPress plugin: StatsFC Score Predictor.

Full Code Example

<html>
<head>
    <title>Your Website Title</title>
</head>
<body>

    <!-- Load jQuery -->
    <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>

    <!-- Load Stats FC Score Predictor SDK -->
    <script>
        (function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = 'https://cdn.statsfc.com/js/score-predictor.js';
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'statsfc-score-predictor-js'));
    </script>

    <!-- Your score predictor here -->
    <div class="statsfc-score-predictor"
        data-key="YOUR STATSFC KEY"
        data-team="Liverpool"
        data-show-match-details="true"
        data-use-default-css="true">
    </div>

</body>
</html>

Settings

Setting HTML5 Attribute Description Default
key data-key Required. Your Stats FC account key. None
team data-team Required. The name of the team you want to show the next fixture for.
E.g., Manchester City, Liverpool
None
competition data-competition Optional. The key of the competition you want to show the next fixture for.
None
date data-date Optional. The date of the fixture you want to show (YYYY-MM-DD).
E.g., 2024-04-28
None
showMatchDetails data-show-match-details Optional. Whether or not you want to show the match details (competition, date, time).
Can be one of: true, false
false
restricted data-restricted Optional. Whether or not you want to restrict the popular scores to those from your own site.
Can be one of: true, false
false
maxDisplayPredictions data-max-display-predictions Optional. The maximum number of predictions to display. 3
timezone data-timezone Optional. The timezone you want to convert the match time to.
Europe/London
omitErrors data-omit-errors Optional. Whether or not you want to omit error messages.
Can be one of: true, false
false
useDefaultCss data-use-default-css Optional. Whether or not you want to use the widget's default styles.
Can be one of: true, false
false
lang data-lang Optional. The ISO 639-1 two-letter language code.
en

Code Generator

Field Value

Credits

If you'd like to help us with any translations please get in touch at hello@statsfc.com.