Introduction
Vimeo videos are embedded on many websites.
If you use the standard embedding methods provided by WordPress (Classic Editor, Gutenberg) or page builders (Beaver, Bricks, Divi, Elementor, Oxygen, WPBakery, and many others) for this purpose and don’t ask for the visitor’s consent beforehand, you’ll probably violate the General Data Protection Regulation (GDPR) in the EU: When displaying a page that contains a Vimeo video, a connection to the Vimeo servers is automatically established in order to load the preview image. In the process, the visitor’s IP address, browser information, and more details about the visitor, and thus personal information, is transmitted to Vimeo. That’s not allowed without explicit consent.
So how can you embed Vimeo videos on your website in a GDPR compliant way?
Solution
MA GDPR Vimeo provides a WordPress shortcode that enables a GDPR compliant and at the same time as simple and efficient as possible embedding of Vimeo videos.
Using this shortcode, the preview image for the video is already retrieved from the Vimeo server and cached locally on your own server. The visitor’s browser is given this local preview image, along with a note about the privacy policy. The browser does not need to establish a connection to Vimeo at this point. The actual video, the required player, and other data is only loaded from Vimeo once the visitor has clicked on it. This procedure is GDPR compliant because the visitor must first actively confirm that he wants to load the video from Vimeo.
To retrieve the video, a “Do Not Track” parameter (dnt=1) is set, to prevent the use of cookies on the part of Vimeo.
MA GDPR Vimeo also has a significant positive impact on popular speed test tools (Page Speed Insights, GTMetrix, etc.), as no data is loaded from external servers until the visitor has given their consent.
Why a Shortcode?
Using a shortcode is the most versatile way to ensure availability across the entire WordPress ecosystem.
- Universal Compatibility: Shortcodes work seamlessly across the Classic Editor, Gutenberg (Block Editor), and popular page builders like Beaver, Bricks, Divi, Elementor, Oxygen, WPBakery, and many more.
- Theme Flexibility: Unlike hard-coded scripts, shortcodes can be placed within widgets, sidebars, or custom templates, ensuring functionality regardless of the theme’s layout.
- Simplicity & Speed: It provides a lightweight, “copy-paste” solution that allows to trigger complex logic without needing to write a single line of code.
- Future-Proof: Even if the theme or editor is changed, the shortcode remains functional, keeping the videos visible without extra configuration.
- Granular Control: Thanks to dozens of parameters within the shortcode, the appearance and functionality – such as dimensions, texts, meta data – can be controlled precisely on a per-video basis.
Shortcode
The simplest and shortest syntax for the shortcode is:
[ma-gdpr-vimeo video="814361316"]
where 814361316 is the ID of the Vimeo video. You can easily copy the ID from the URL of the Vimeo video:

This shortcode can easily be written directly as a new paragraph in the Classic editor.
Gutenberg provides a Shortcode block.
Also in page builders, there is usually a separate “Shortcode” element available for this purpose.
This shortcode generates the following output:

In the center, the thumbnail is overlaid by the play button similar to the one on Vimeo.
At the bottom, the visitor sees a note on privacy policy in a colored bar.
Thumbnail
The thumbnail is loaded once from Vimeo, cached on the site’s own server, and served to the visitor from there.
MA GDPR Vimeo requests the thumbnail in various sizes: 1280, 1024, 960, 768, 640, and 480 pixels wide.
Vimeo does not always return all of these sizes, and sometimes returns alternative sizes, such as 295 pixels.
MA GDPR Vimeo recognizes and handles this accordingly.
Note:
- The browser will be provided with a choice of all image sizes. The browser decides itself which image size to load.
Cache
The thumbnails loaded from Vimeo are automatically stored on the server in the /wp-content/uploads/ma-gdpr-vimeo/ directory. The directory is created automatically if it doesn’t already exist. A separate subdirectory is created for each video ID.
Shortcode Parameters
For the shortcode to work, it is mandatory to specify the desired Vimeo video with the shortcode parameter video.
In addition, the shortcode allows some more parameters, which are explained further.
video
The video parameter is used to specify a Vimeo ID or a Vimeo URL for the desired video.
The Video ID consists of numbers and letters.
If a URL is specified, the ID is automatically determined from it.
Samples:

[ma-gdpr-vimeo video="814361316"]

[ma-gdpr-vimeo video="https://vimeo.com/814361316"]
aspect-ratio
The default aspect ratio for Vimeo videos is 16:9.
The aspect-ratio parameter allows you to use a different aspect ratio, such as 4:3 or 1:1 (square).
Any aspect ratio can be specified here as long as the syntax is kept as two numbers separated by a colon or a slash: “width:height” or “width/height”
The thumbnail and the Vimeo Player will automatically fit the aspect ratio specified here. The video itself will be shown in the original aspect ratio, possibly then with black bars.
Samples:

[ma-gdpr-vimeo video="814361316" width="350px" aspect-ratio="1:1"]

[ma-gdpr-vimeo video="814361316" width="200px" aspect-ratio="9:16"]
gdpr-text
MA GDPR Vimeo defines a notice text about the privacy policy in different languages:
| Language | Text |
|---|---|
| DA | Når du har trykket, vil videoen blive indlæst fra Vimeo’s servere. Se vores {privatlivspolitik} for flere informationer. |
| DE | Bei Klick wird dieses Video von den Vimeo Servern geladen. Details siehe {Datenschutzerklärung}. |
| EN | When clicked, this video is loaded from Vimeo servers. See our {privacy policy} for details. |
| ES | Al hacer clic, este vídeo se carga desde los servidores de Vimeo. Consulte la {política de privacidad} para más detalles. |
| FI | Klikattuasi, tämä video ladataan Vimeon palvelimilta. Katso lisätietoja meidän {tietosuojaselosteesta}. |
| FR | En cliquant, cette vidéo est chargée depuis les serveurs de Vimeo. Voir la {politique de confidentialité}. |
| HU | Kattintás után ez a videó a Vimeo szervereiről kerül lejátszásra. A részletekért olvassa el az {Adatkezelési Tájékoztatót} oldalt. |
| IT | Quando si clicca, questo video viene caricato dai server di Vimeo. Vedere {l’informativa sulla privacy} per i dettagli. |
| JA | クリックすると、この動画が Vimeo サーバーから読み込まれます。詳細については、{プライバシー ポリシー} をご覧ください。 |
| NL | Na het klikken wordt deze video geladen vanaf de servers van Vimeo. Zie ons {privacybeleid} voor meer informatie. |
The language is selected based on your website’s or page language. Polylang is supported.
If no default text is available for your page’s language, English is selected instead.
The text in curly brackets is replaced with a link to the privacy policy page configured in WordPress (Settings > Privacy), with the text in brackets serving as the link text.
The notice text can be customized to your own requirements, for example other languages, via parameter gdpr-text.
Example:
[ma-gdpr-vimeo video="814361316" gdpr-text="Please read our {privacy policy} before clicking."]

The parameter gdpr-text can also be set to be empty. In this case, no hint text is displayed at all. This is especially conceivable in conjunction with the parameter new-window.
[ma-gdpr-vimeo video="814361316" gdpr-text=""]

gdpr-text-size
By default, the notice text is displayed in the font size 0.7em, i.e. 70% of the text size defined for this block.
The gdpr-text-size parameter can be used to adjust the text size to your own requirements. Any valid CSS specification for the text size is allowed.
Example:
[ma-gdpr-vimeo video="814361316" gdpr-text-size="20px"]

notice-style
The design of the privacy notice can be customized as needed.
White font on blue bar? No problem!
Example:
[ma-gdpr-vimeo video="814361316" notice-style="background-color:blue; color:white"]

notice-class
With an own CSS class this can be done even more targeted. For example, you can also control the design of the link:
Example:
<style>
body .my-notice-class {
background-color: blue;
color:white;
}
body .my-notice-class a {
font-weight: bold;
font-size: 110%;
}
</style>
[ma-gdpr-vimeo video="814361316" notice-class="my-notice-class"]

width
By default, a width of 100% is set for the video block. The video block thus occupies the entire width of the enclosing block, e.g. a DIV or a column. The default of 100% allows easy adjustment of the responsive view by the parent element.
The height is automatically calculated from the width and aspect ratio.
If needed, the width can be changed with the width parameter. All valid CSS specifications for the width of an element are allowed.
Example:
[ma-gdpr-vimeo video="814361316" width="300px"]

Note: I recommend to leave the width at the default of 100% and instead style the enclosing block for responsive viewports using CSS media queries.
alt / title
The alt and title parameters set the corresponding HTML attributes for the preview image.
The alt attribute is used to support search engines and accessibility.
The title attribute provides the tooltip text.
[ma-gdpr-vimeo video="814361316" alt="A video showing Planet Earth" title="Planet Earth"]

Vimeo metadata can also be displayed here.
thumbnail
With the parameter thumbnail you can use your own thumbnail instead of the one loaded from Vimeo.
Either a full URL to an image can be specified here, or the media ID of an image that has already been uploaded to WordPress.

[ma-gdpr-vimeo video="814361316" thumbnail="/wp-content/uploads/2026/04/ma-gdpr-vimeo_custom-thumbnail.jpg"]

[ma-gdpr-vimeo video="814361316" thumbnail="3871"]
(Photo Credit: NASA/Reid Wiseman)
title-text
MA GDPR Vimeo shows the preview image from Vimeo, but no title to the video.
The parameter title-text can be used to display a title above the preview image.
[ma-gdpr-vimeo video="814361316" title-text="Planet Earth"]

The title is displayed by default in the top left corner, white font in standard size, with a subtle shadow to make the text readable even on bright thumbnails.
Vimeo metadata can also be displayed here.
title-style
The default style for the title is defined as:
.ma-gdpr-vimeo-title {
position:absolute;
width: 100%;
top: 1em;
padding: 0 1em;
color: white;
text-shadow: black 1px 1px 2px;
}
The parameter title-style can be used to adjust the positioning and design of the title.
Positioning

[ma-gdpr-vimeo video="814361316"title-text="Planet Earth" title-style="top:unset; bottom:30%;text-align:center"]
Design

[ma-gdpr-vimeo video="814361316" title-text="Planet Earth" title-style="top:1rem; font-size:2em; color:red; text-align:center;"]
title-class
To globally control the positioning and design of the titles, the parameter title-class allows to specify a global CSS class.
Beispiel:
<style>
body .my-video-title-class {
top: 1rem;
font-size: 1.5em;
line-height: 1;
color: blue;
text-align: center;
}
body .my-video-title-class span {
display: inline-block;
transform: rotate(-15deg);
color:red;
}
</style>
[ma-gdpr-vimeo video="814361316" title-text="Planet Earth <span>with Class</span>" title-class="my-video-title-class"]

play-button
MA GDPR Vimeo provides different play button types.
The default button type is vimeo, which does not need to be specified explicitly.
The parameter play-button can be used to select the desired button:
Button Type
vimeo

[ma-gdpr-vimeo video="814361316" play-button="vimeo"]
Button Type
circle

[ma-gdpr-vimeo video="814361316" play-button="circle"]
Button Type
circle-o

[ma-gdpr-vimeo video="814361316" play-button="circle-o"]
Button Type
play

[ma-gdpr-vimeo video="814361316" play-button="play"]
play-button-color
The color of the Vimeo Play button is black. The other button types have white as default color.
The parameter play-button-color can be used to set a different color for the button.

[ma-gdpr-vimeo video="814361316" play-button-color="blue"]

[ma-gdpr-vimeo video="814361316" play-button="circle" play-button-color="green"]

[ma-gdpr-vimeo video="814361316" play-button="circle-o" play-button-color="black"]
play-button-class
The parameter play-button-class allows you to use a custom CSS class for the play button.
A green play button on the “Green Energy” page (Post ID 3877)? No problem!
Beispiel:
<style>
body.postid-3877 .my-play-button {
color:green;
}
</style>
[ma-gdpr-vimeo video="814361316" play-button-class="my-play-button"]

new-window
The parameter new-window opens the video in a new browser tab directly on the Vimeo page.
This may be desirable if you want to display only very small thumbnails of the videos in WordPress, which are unsuitable for direct integration of the player.
[ma-gdpr-vimeo video="814361316" new-window=1]

Global Parameters
All shortcode parameters can be defined globally.
This simplifies the uniform design of the videos and spares the definition of the parameters for each individual video.
For this purpose, a global variable $GLOBALS['ma_gdpr_vimeo'] is created as an array and supplied with the desired settings.
This can be done quite easily with a code snippet with e.g. the following content:
$GLOBALS['ma_gdpr_vimeo'] = [
'play-button' => 'play',
'play-button-class' => 'my-play-button',
];
A special solution applies here to the gdpr-text parameter, which is language-sensitive.
The specification of a global parameter gdpr-text sets the text globally to a uniform value.
The addition of a language flag controls the text output per language.
$GLOBALS['ma_gdpr_vimeo'] = [
'gdpr-text' => 'Read the {privacy policy}.',
'gdpr-text-de' => 'Info zum {Datenschutz}',
];
More Vimeo Parameters
Vimeo itself offers even more parameters for controlling video playback and the appearance of the player.
An overview of the available parameters can be found here: https://developer.vimeo.com/api/oembed/videos.
Currently, these parameters are not supported, but may be implemented upon request and demand.
Vimeo Player
Clicking on a video activates an iFrame that loads the video from the Vimeo servers.
All of Vimeo’s usual features are available here.
In MA GDPR Vimeo, the player is implemented in a way that when clicking on a video, a possibly other, already running video is paused. Thus, multiple videos will not run at the same time.
Vimeo Metadata
Vimeo provides some meta data for each video.
This includes the video title, author and description.
This metadata can be used via placeholders to attribute the video.
Currently supported are the placeholders @title@, @author_name@, @description@ in the alt, title and title-text parameters.
Sample:
[ma-gdpr-vimeo video="814361316" title="@title@" title-text="@title@ by @author_name@<br>@description@" alt="@title@"]

Created with Fusion, 2017
Hide from Vimeo
In the privacy settings for a Vimeo video there is the option “Hide from Vimeo”, which removes a video from Vimeo lists and only allows access via a special URL with an additional hash code.
The URL to the video can have different formats:
- https://vimeo.com/1234567/a123b456c7
- https://vimeo.com/1234567:a123b456c7
- https://vimeo.com/1234567?h=a123b456c7
In all these cases, 1234567 is the video ID, and a123b456c7 represents the hash code.
MA GDPR Vimeo supports the hash code in different variants
[ma-gdpr-vimeo video="1234567" h="a123b456c7"]
[ma-gdpr-vimeo video="https://vimeo.com/1234567/a123b456c7"]
[ma-gdpr-vimeo video="https://vimeo.com/1234567:a123b456c7"]
[ma-gdpr-vimeo video="https://vimeo.com/1234567?h=a123b456c7"]

Notes on page builders
Oxygen (Classic) Builder
When closing Oxygen Modals, the src attribute of IFrames is reset to stop the video.
Oxygen implements this with this.src = this.src.
This simultaneously removes all event handlers of MA GDPR Vimeo.
When a modal is closed, the video is stopped, but MA GDPR Vimeo loses all control over the state of the video.
From this point on, MA GDPR Vimeo can no longer automatically stop videos when a new video is started.
Settings
WordPress Admin Menu > Settings > MA GDPR Vimeo displays the administration pages where you can manage the cache and configure the shortcode settings.
Cache
This page allows you to manage the cache.
It displays all cached videos along with their key details.
You can delete individual videos or all videos from the cache, or refresh them from Vimeo.

Note:
If the cache for a video that is still embedded on a page is deleted, the video cache will be automatically regenerated the next time the page is loaded.
Shortcode Presets
On this page, you can set global defaults for shortcodes.
For example, if you want to apply a specific style throughout the entire website, you can specify it here centrally rather than as a parameter for each individual shortcode.
However, these global defaults can be overridden for individual shortcodes using parameters if necessary.

Tip:
The GDPR text can be provided in up to 10 languages.
If another language is needed, you can simply overwrite an existing language.
FAQ – Frequently Asked Questions
Software Installation and Updates
Installation
The software can be installed using various methods:
Plugin:
The software is available as a plugin (ZIP archive) and can be installed in WordPress as a plugin.
Code Snippet:
The software can be run as a code snippet.
For the “Code Snippets” and “Advanced Scripts” plugins, a JSON file is available for download that can be directly imported there.
PHP:
The software can be downloaded as a PHP file.
This PHP file can be used in other code snippet plugins (copy & paste the code) or be included in your own WordPress child theme (require_once('path/to/the.php');).
Updates
The software automatically checks for available updates:
Plugin:
The update process follows standard WordPress methods: It checks for a new version every 12 hours.
The update can then be performed manually or automatically.

Code Snippet & PHP:
The software implements a special method that checks for updates even when installed as a snippet or PHP include. As with plugins, the check interval is set to 12 hours.
If a newer version is available, a notification will be shown in the admin area.

Download
Donation ❤️
I enjoy developing software and solving typical requirements with them.
The software is provided for free use.
If you like, you can honor my many hours of work with a small coffee donation via PayPal.
When clicking the button, a connection to PayPal is established.
Your donation will, of course, be taxed properly by me.
Disclaimer
I have developed and tested this software to the best of my knowledge.
I provide the software for free use.
I cannot give any guarantee for the functionality because of the countless possible variations in WordPress environments.
Download and use of this software is at your own risk and responsibility.
Change Log
- Version 2.0.010. May 2026Requires At Least WordPress: 5.8•Tested Up To WordPress: 6.9.4•Requires PHP: 7.4
New Features:
- Now available as Code Snippet, Include, and Plugin with automatic update check.
For snippet or include, checks for updates every 12 hrs (same frequency used by WP for plugin updates),
and shows update notice in admin area, dismissible for 12 hrs. Can also be checked manually on the Settings page.
For plugin, WordPress standard update mechanism is used. - Settings > MA GDPR Vimeo
- Manage the video cache (thumbnails and meta data retrieved from Vimeo): Cache can be deleted or refreshed from Vimeo.
- Configure presets values for shortcode parameters
Changes:
- Predefined GDPR texts for different languages
Now handle the privacy policy term in curly brackets instead of %s placeholder plus
separate term. This simplifies editing the texts on the settings page.
Caution! Old syntax (%s placeholder plus separate term) is not supported anymore.
If you used the $GLOBALS method to define GDPR texts, this must be adapted to the new format. - Vimeo requests
- Video details and thumbnails are now retrieved using cURL instead of file_get_contents to avoid the requirement for allow_url_fopen.
- Requests to Vimeo now send Client Hints (Sec-CH-UA...).
- Accept-Language now uses fallbacks.
- Error handling and logging:
- Added more specific error messages for different failure points (e.g. thumbnail retrieval, video info retrieval, parsing errors) to improve
- If basic video data (title, description, duration) is empty after retrieval from Vimeo, the video is considered as unavailable, and an error message is shown.
- Handling non-existing manual thumbnails: If a manual thumbnail is specified but not found, fall back to Vimeo thumbnail
- Added proper html and attribute escaping, and using kses for attributes that allow HTML (title, gdpr-text)
- Added shortcode parameter 'thumbnail-loading' to optimize thumbnail loading (lazy or eager with fetchfiority=high).
- Replaced error suppression (@ operator) with try-catch blocks
Fixes:
- Added width/height attributes to SVG symbol definition, to avoid a gap at the page end in Bricks Builder.
That gap was caused by a Bricks CSS rule to set a min-width/height for <svg> without width/height attributes.
(Thanks to Stephen Vaughan for reporting!)
- Now available as Code Snippet, Include, and Plugin with automatic update check.
- Version 1.4.310. December 2025Requires At Least WordPress: 5.3•Tested Up To WordPress: 6.9•Requires PHP: 7.4
Fixes:
- If video details don't contain thumbnail details, show error message, possibly with required hash parameter.
- Version 1.4.2Download not available.11. July 2025
Fixes:
- Fixed warning about undefined array key in parse_video_url()
- Version 1.4.1Download not available.11. October 2024
Fixes:
- Fixed missing styling of video preview (play button, GDPR text) in Bricks builder.
- Version 1.4.0Download not available.4. July 2024
New Features:
- Support for unlisted Vimeo videos with hash parameter "h" in shortcode or URL
- Loading more thumbnail sizes from Vimeo
Changes:
- Replaced deprecated Vimeo SimpleAPI by oEmbed
- Cache JSON format has changed due to the change from SimpleAPI to oEmbed
- Version 1.3.1Download not available.--
Changes
- Added width and height attributes for thumbnail images
- Version 1.3.0Download not available.28. April 2024
Reorganization of code base.
New Features:
- For better accessibility, the Enter key can now be used to start and stop videos.
(Thanks to Stephan Koenigk for his feature request and pre-release tests)
Changes:
- For invalid IDs, don't create directory, store json, attempt to retrieve thumbnails
- In Builders Bricks and Oxygen, click handler is deactivated to allow selecting element
- Preparation for Bricks Element. Coming soon.
- For better accessibility, the Enter key can now be used to start and stop videos.
- Version 1.2.0Download not available.30. December 2023
New Features:
- Complete rebuild of JS
- Now using Vimeo Player API to provide more control
- Video player management via players registry and observer
- Pause current video if another one is started
- Pause video if modal/popup closed (evaluated by visibility of parent DOM element)
- Support for dynamically embedded videos using AJAX calls
- Removed init prevention for AJAX calls
- Added PHP method MA_GDPR_Vimeo::enable_footercode() to trigger output of footer code (styles, scripts, svg) for video embeds dynamically loaded by AJAX calls
- Play click handler is now assigned as onclick event instead of collecting all videos after page load. This eliminates the need for an extra click handler initialization for players dynamically loaded after page load.
- Optimizations for accessibility
Fixes:
- Prefixed wrapper/player IDs with snippet slug to prevent IDs starting with number
- Fallback for aspect ratio via padding-top (CSS variable, @supports rule) for older browsers not supporting aspect-ratio like Safari < V15
- Version 1.1.1Download not available.9. November 2023
Fixes:
- Error "Attempt to assign property 'notes' on null" in get_video_details()
- Version 1.1.0Download not available.4. April 2023
New Features:
- Pause handler for closed Oxygen Modals
- Version 1.0.0Download not available.3. April 2023
Initial Release
