Team Next Match Prediction
Automatically finds a team's upcoming match and lets users predict on it.
The Team Next Match Prediction widget automatically identifies a team's upcoming match and lets signed-in users predict on it. It resolves the fixture, then renders the Event Card component with its prediction markets shown inline.
<div data-component="fu-widget" data-content-type="team-next-match-prediction" data-content-id="your-team-id" data-market="FT_1X2"></div>Configuration
| Attribute | Description | Options/Format | Default |
|---|---|---|---|
data-content-id | Team ID to find the next match for | e.g. "fb:t:817" | Required |
data-market | The prediction market to offer | Any market | "FT_1X2" |
data-match-prediction-market-id | The same thing under the config's name. data-market wins if both are set | Any market | data-market |
data-match-prediction-cutoff-minutes | Minutes before kickoff when predictions close. 15 is also the minimum | Integer ≥ 15 | 15 |
data-match-prediction-allow-delete | Let users remove a prediction they already made | "true", "false" | true |
data-match-prediction-template | Visual density of the event card | "compact", "standard", "hero" | "standard" |
data-match-prediction-type | Kind of card. "detailed" is reserved (not implemented yet) | "header", "detailed" | "header" |
data-match-prediction-show-competition | Show the competition header above the competitors | "true", "false" | true |
data-match-prediction-show-odds | Render betting odds. Not yet backed by the API, so currently renders nothing | "true", "false" | true |
data-match-prediction-live-refresh | Poll the events API while the event is LIVE | "true", "false" | true |
data-match-prediction-refresh-interval | Live-refresh poll interval in milliseconds. Only applies while LIVE | Positive integer | 30000 |
Configuration is identical to Match Prediction, down to the attribute prefix and the shared matchPrediction object in FuWidget.init() — the only difference is that data-content-id is a team id, and the widget resolves that team's next fixture before rendering. Nothing is rendered when the team has no upcoming match.
FuWidget.init({
// ... other config
matchPrediction: {
marketId: "FT_1X2", // Applies to both this widget and Match Prediction
template: "hero",
showCompetition: false,
},
});Requirements
Predictions are shown only when the visitor is signed in and the resolved fixture is a football match the Prediction API recognizes; otherwise the event card renders without any prediction UI. Predictions close 15 minutes before kickoff by default.
Features
- Automatically fetches the team's next scheduled match
- All prediction markets supported by the Match Prediction widget, one per widget
- Full control of the underlying event card — template, card type, competition header, odds, live refresh
- Community prediction statistics with a visual percentage bar per outcome — see Match Prediction → Community Statistics
- One prediction record per market, each editable and removable on its own
- Competition, competitors, kickoff time and live score from the Event Card component
- Team logo and name display
Implementation Tips
- This widget is ideal for team pages where you want to show the next upcoming match.
- Saves the effort of manually updating match IDs as fixtures change.
- The markets a user can actually submit depend on the league/competition of the team's upcoming match.
Updated 3 days ago
