Install Dynamic Pages
Turn Dynamic Pages on for a domain, connect your website's pages and check them before you announce them.
This guide connects your livescore to a page on your website for every match, competition, team and player. Start with one domain and check it end to end before you activate more.
You need access to your website's routing
Dynamic Pages gives you links and widgets. It does not host pages for you. You, or your developer, must make your website answer the new addresses, including when someone opens one directly in a new tab. If your site builder only lets you paste a block of code, use Modal, In-widget content or Floating cards until the routes are ready.
Before you start
- Your plan is Pro or Ultra. Each includes Dynamic Pages on one domain. For more domains, use Request an additional domain in Domains; SoccersAPI confirms the change before billing it.
- The domain is approved in Domains. Activating Dynamic Pages does not add domains or views to your plan.
- You can publish pages on your website and configure its routes, or you can send this guide to the person who does.
1. Turn it on for the domain
Open Domains and select your website's domain. Check the Configuration it loads: that is the design visitors will get, whatever configuration you have open in the editor.
Turn on Dynamic Pages. The counter shows how many domains use it and how many your plan includes. Using your included domain does not charge your card. When the allowance is in use, turn it off on the other domain first, or request an additional one.
Open the configuration that domain loads. In Entity navigation, set Navigation mode to Dynamic Pages. Then, in Dynamic Pages, review the Match URL base, League URL base, Team URL base and Player URL base, and the link targets. Save.
Turning Dynamic Pages on for the domain does not change the navigation mode by itself: the configuration must ask for it.
Open Get code, choose the domain and check the configuration shown next to it. If you are editing a different configuration from the one the domain installs, the tab says so and offers to assign it.
2. Connect your website
In Get code, open Connect your Dynamic Pages · setup instructions. It lists the addresses your website must answer, with the language and URL bases of the domain's configuration. With the defaults and English they are:
| Page | Address | Widget on that page |
|---|---|---|
| Match | /en/matches/{name}/{id} | entity="match" with matchid |
| Competition | /en/leagues/{name}/{id}/{season} | entity="league" with leagueid, and seasonid when the address has one |
| Team | /en/teams/{name}/{id} | entity="team" with teamid |
| Player | /en/players/{name}/{id} | entity="player" with playerid |
{name}is a readable name that the widget writes into its links. The number,{id}, is what identifies the item; the name can be anything.- The language part uses standard codes:
zhfor Chinese,elfor Greek andtrfor Turkish, even though the widget'slocaleusescn,grandtk. - Use the links the widget creates to test. The braces above are placeholders, not addresses to publish.
Option A: start from the downloadable page
- Select Download page starter. The file,
dynamic-pages.html, already contains your widget code, the language and the URL bases. - Publish it on your website. Opening the file from your computer does not test anything: it must run on the approved domain.
- Configure your server to serve that same file at the detail addresses, keeping the address the visitor asked for. This is a rewrite, not a redirect to the homepage. Limit it to the addresses above and leave the rest of your site as it is.
- The file shows the livescore at
/and/en, and the right widget at each detail address. Any other address shows Page not found and tells search engines not to index it. Your server should also answer those addresses with a 404 status. - If you later change the language or the URL bases, download the file again and update your rewrite rules.
Option B: use your own pages
Your developer can keep your site's layout and routing. For each address above, the page must:
- read the language, the number and, for competitions, the optional season from the address;
- render the widget with the attributes in the table, keeping
uidandwidget-idfrom the domain's installation code; - load the script from the installation code once; when your site changes page without a full reload, update or re-create the widget so it shows the new item;
- work when the address is opened directly, not only after a click inside your site (WordPress and other CMSs need a route or template for this too; pasting the widget code alone is not enough);
- handle an unknown address or item with a proper error, not with an unrelated livescore page.
This is a routing contract, not a plugin for a particular CMS or framework.
3. Check before you announce it
Run these checks on the approved domain, on a computer and on the phones your visitors use, in a fresh tab as well as in the one you worked in.
| Check | Expected result |
|---|---|
| Open a match from the livescore | The address changes and the Match widget shows the same match. |
| Open a competition, a team and a player | Each address shows that item, not the same generic page. |
| Paste a detail address into a new tab | The page loads without visiting the homepage first. |
| Reload a detail page | The same item is still shown, not a 404 from your server. |
| Go back and forward | The address and the item stay in step. |
| Open an invalid address | Your site answers with a not-found page, not a livescore or an endless loader. |
| Check installation traffic | The domain shows traffic. That confirms the widget loads, not that every page is right. |
The configurator preview does not test your routes. Only your live site does.
Common problems
| Symptom | What to check |
|---|---|
| Clicks still open a window | Dynamic Pages is on for this domain, the configuration the domain loads uses Dynamic Pages as navigation mode, and it is saved. |
| A click works but a reload gives a 404 | Your server does not answer that address. Fix the rewrite. |
| Every link goes back to the homepage | Your server redirects instead of rewriting. Keep the requested address. |
| The wrong design appears | Check the domain's Configuration in Domains and in Get code. |
| The language or words in the address are wrong | Compare the configuration, the addresses in Get code and your deployed page, and update them together. |
| Domain unauthorized | The page runs on a domain that is not approved. The message names the domain it saw. |
| The switch is disabled | Your allowance is in use, or your plan is not Pro or Ultra. |
Search engines and page information
A working address is only part of a page. Your website owns what search engines read: the HTTP status, the page title and description, the canonical link, any content rendered on the server and your sitemap. With Broadcast entity metadata on, the widget tells your page which item is open, so your developer can fill in the title and description (see Events). Dynamic Pages does not promise indexing or rankings.
Getting help
Send support the public page address, the domain, the configuration name, the detail address that fails, the browser and device, and what happened. Say whether it fails on a click, on a direct visit or on a reload. Never send passwords, API keys or payment details.
For what Dynamic Pages includes and who can use it, see Dynamic Pages add-on.