If you want to embed a gallery with Javascript code, you can use following code:

const el = document.createElement('covet-pics-widget');      
el.galleryEmbedId = XYZ;            
// now embed gallery into a       
const wrap = document.querySelector(".my-gallery");      
wrap.appendChild(el); 

This could be useful if you want to programmatically embed the gallery, for eg. you can create a script that will detect a user scrolling and embed the gallery only after the user has scrolled to a certain position on the page.