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

AttributeDescriptionOptions/FormatDefault
data-content-idTeam ID to find the next match fore.g. "fb:t:817"Required
data-marketThe prediction market to offerAny market"FT_1X2"
data-match-prediction-market-idThe same thing under the config's name. data-market wins if both are setAny marketdata-market
data-match-prediction-cutoff-minutesMinutes before kickoff when predictions close. 15 is also the minimumInteger ≥ 1515
data-match-prediction-allow-deleteLet users remove a prediction they already made"true", "false"true
data-match-prediction-templateVisual density of the event card"compact", "standard", "hero""standard"
data-match-prediction-typeKind of card. "detailed" is reserved (not implemented yet)"header", "detailed""header"
data-match-prediction-show-competitionShow the competition header above the competitors"true", "false"true
data-match-prediction-show-oddsRender betting odds. Not yet backed by the API, so currently renders nothing"true", "false"true
data-match-prediction-live-refreshPoll the events API while the event is LIVE"true", "false"true
data-match-prediction-refresh-intervalLive-refresh poll interval in milliseconds. Only applies while LIVEPositive integer30000

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.
📘

Related: Match Prediction (the same widget for a known fixture) · Widgets → Event Card → Predictions.


Did this page help you?