Inline frame (iframe)
External content loaded using iframes may set cookies and in some cases you need to conditionally load the iframe content based on user consent.
Loading iframe conditionally is just as easy as loading scripts and the syntax is similar. You just have to add the data-consent attribute with the value of the cookie categories and change the src attribute to data-src.
Example:
<iframe src="https://www.youtube.com/embed/NHEaYbDWyQE" frameborder="0"></iframe>
Should be changed to:
<iframe data-consent="analytics" data-src="https://www.youtube.com/embed/NHEaYbDWyQE" frameborder="0"></iframe>