Code snippet:

<script src="https://static.anycreek.com/embed/widget.js"></script>
<script>
   window.anycreek.init({
     id: 'cli1wn2370000lf0f8jelc91z',
     logoUrl: 'https://website.com/logo.png' // Optional
   });
   
    document.addEventListener("DOMContentLoaded", function() {
        // Step 1: Select the links based on the query parameter
        var links = document.querySelectorAll('a[href*="anycreekEmbed"]');
      
        // Step 2: Add a click event listener to each selected link
        links.forEach(function(link) {
            link.addEventListener('click', function(event) {
                // Your click handler code goes here
                event.preventDefault(); // Prevents the default link behavior (e.g., navigating to a new page)
                window.anycreek.open();
            });
        });
    });
</script>