Additional note: In order for Analytics events to work, the Youtube API has to be loaded before the triggers in Tag Manager.. That's outside of the scope of this issue and can be done in a child theme already.
Objectives of task:
Allow child themes to customize parameters of embedded Youtube videos.
Brief summary of task:
Planet4 uses
lite-youtube-embed
for embedded Youtube videos. At the moment, parameters added to the video URLs are hard coded in the master theme.Adding a filter to customize these parameters allows child themes to fine tune the Youtube video experience to their needs. Examples:
enablejsapi=1
to allow Analytics data gathering (required for GA4 automatically collected events) on videos and Youtube Player API functionality.color
,modestbranding
,origin
Additional note: In order for Analytics events to work, the Youtube API has to be loaded before the triggers in Tag Manager.. That's outside of the scope of this issue and can be done in a child theme already.
Objectives of task:
Allow child themes to customize parameters of embedded Youtube videos.
Relevant documentation:
Youtube player parameters: https://developers.google.com/youtube/player_parameters#Parameters
GA4 automatically collected events: https://support.google.com/analytics/answer/9234069?hl=en
Youtube iFrame player API: https://developers.google.com/youtube/iframe_api_reference
Other resources:
No response
Estimated length of task:
Short
Timeline for task:
As soon as possible
Dependencies on other work:
none
Example of similar work:
No response
Help:
No response