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-show-summary | Show how everyone predicted the market | "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" adds the detail tab strip below the header | "header", "detailed" | "header" |
data-match-prediction-show-competition | Show the competition header above the competitors | "true", "false" | true |
data-match-prediction-show-form | "detailed" only. Show the Preview tab (form, streaks, latest results) | "true", "false" | true |
data-match-prediction-show-timeline | "detailed" only. Show the Summary tab (main-events timeline) | "true", "false" | true |
data-match-prediction-show-stats | "detailed" only. Show the Stats tab | "true", "false" | true |
data-match-prediction-show-lineups | "detailed" only. Show the Lineups tab | "true", "false" | true |
data-match-prediction-show-standings | "detailed" only. Show the Table (standings) tab | "true", "false" | true |
data-match-prediction-show-head-to-head | "detailed" only. Show the H2H tab | "true", "false" | true |
data-match-prediction-default-section | "detailed" only. Which tab opens first | "preview", "summary", "stats", "lineups", "table", "h2h" | First tab of the event's status |
data-match-prediction-show-odds | Render betting odds under the scoreboard of an upcoming or live event — see Betting Odds | "true", "false" | false |
data-match-prediction-odds-market | The market to show | See Odds Widget → Markets | "FT_1X2" |
data-match-prediction-odds-mode | "flash" alternates the operator logo and the prices instead of showing both | "default", "flash" | "flash" on compact, "default" otherwise |
data-match-prediction-odds-flash-interval | Flash interval in milliseconds. Ignored unless the mode is "flash" | Positive integer | 3000 |
data-match-prediction-odds-polling-interval | Odds poll interval in milliseconds | Positive integer | 30000 |
data-match-prediction-odds-operators | Comma-separated operator config ids, in preference order — the card shows one operator, the first with a complete market | e.g. "betano-bg,efbet-bg" | First operator with prices |
data-match-prediction-odds-affiliate-id | Affiliate id substituted into every operator URL carrying an {affiliate_id} placeholder | Affiliate id string | None |
data-match-prediction-odds-affiliate-ids | JSON object of per-operator affiliate ids. Wins over data-match-prediction-odds-affiliate-id | e.g. '{"betano-bg":"aff-123"}' | None |
data-match-prediction-operator-id | Deprecated — use data-match-prediction-odds-operators. Still honoured when that is unset | Operator config id, e.g. "betano-bg" | None |
data-match-prediction-add-to-betslip | Push a clicked odds price into the Betslip widget on the page | "true", "false" | false |
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 (including the
"detailed"tab strip), competition header, odds, live refresh - Community prediction statistics, on by default, revealed once the user has answered — 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 4 days ago
