With the Contextual Embed feature, the Player algorithm picks and embeds the most relevant videos for your web pages based on its content, saving you time and effort.
What are the benefits of the Contextual Embed feature?
-
Save time - The Player algorithm scans the page and find the most relevant video from your profile or Organization catalog
-
Maximize your video inventory - Play more videos on your property without the hassle of manually curating them
- Increase ad revenue - The Player benefits from additional ad opportunities on your website
How does it work
When a Player with Contextual Embed feature is embedded on a page, it will automatically retrieve useful data from that page, such as:
- Page URL: www.your-website.com/your-article-name/
-
Titles: we are checking if your page contains
h1
then falling back onh2
h3
andtitle
- Content: the text content of the page
These data are sent by the Player to our recommendation engine to determine the context of the page, which in return will send to the Player a selection of relevant videos to play.
Video selection limited to recent content
The contextual embed feature will only select videos that are less than 2 years old. This filter is applied automatically and cannot be disabled.
Compatible with preview and staging environments
This feature is designed to work across all environments, including preview and staging environments. This allows you to test and preview the feature’s relevancy before publishing anything to production.
Implementation
1. Enable the "Contextual Embed" feature on your Player
Use the following steps to enable the "Contextual embed" feature on your Player configuration via the Dailymotion Studio:
- From your Dailymotion Studio, go to Embed > Players
- Click on Create player
- Give a name to your Player in the Player name field. Make sure you can easily distinguish it from others.
- Scroll down to the Contextual Embed section and toggle on "Allow Player to choose content" to activate the feature. Then, define whether the content selected by the Player should come from your profile or your Organization catalog.
- Click Save to save your Player configuration
You have created a Player with the Contextual Embed feature activated. You can now add this Player on a web page to let its algorithm pick content relevant to that page.
2. Embed your contextual Player
Follow these steps to embed the Player with Contextual Embed activated:
- From your Player configuration page, copy the embed code located at the top. Choose your preferred method: either Player Embed Script or Player Library Script. This feature is not compatible with the iFrame embed method.
If you don't know which embed code to use, you can learn more about each embed method. - Paste the embed code on your web page where the Player should appear
Important:
To benefit from the contextual embed feature, your Player should be embedded empty, without any video ID or playlist ID. Make sure to remove them from the embed code. Otherwise it will override the Contextual Embed feature and be played.
Your embed code should look like this:
Player Embed Script
// {Player ID} retrieved in Player configuration
<script src="https://geo.dailymotion.com/player/{Player ID}.js"></script>
Player Library Script
// {Player ID} retrieved in Player configuration
<body>
<script src="https://geo.dailymotion.com/libs/player/{Player ID}.js"></script>
<div id="my-dailymotion-player">My Player placeholder</div>
<script>
dailymotion
.createPlayer("my-dailymotion-player")
.catch((e) => console.error(e));
</script>
</body>
FAQ
Which data are used to match an article with videos?
The Contextual Embed algorithm uses data from the article:
- Page URL
-
Article title:
h1
then falling back onh2
h3
andtitle
(in this order) -
Text content:
innerText
which removes image captions or any other irrelevant html content from the analysis
And matches them with the following video metadata from either your profile or Organization:
- Video title
- Description
- Tags
Make sure to fill in your video metadata with accurate information to ensure best results.
How much content can the model analyze?
Our model can analyse up to 128 000 words in your article.
Supported languages
"Contextual Embed" works best with the following languages:
Arabic | English | Japanese | Russian |
Chinese-simplified | French | Korean | Spanish |
Chinese-traditional | German | Polish | Thai |
Dutch | Italian | Portuguese | Turkish |
Please note that results may be less relevant for languages not fully supported by our algorithm.
Best practices
Activate First-time viewable |
To reduce loading time, we recommend enabling First-time viewable. You can find this setting in the "Playback behavior" section at the top of the Player configuration page. Simply toggle on "Autostart" and "First-time viewable". |
---|---|
Video metadata |
We are using videos' title, description and tags to match them with articles. Make sure to fill in your video metadata with accurate information to ensure best results. |
Video language |
Contextual Embed will select videos that have the same language than the one detected in the article. Make sure to fill in the correct language information in your Dailymotion Studio. |