Google Tag Manager example: Add to waitlist
Here's a Google Tag Manager tag example to add a "Add to waitlist" button link to your website, if a unit type is not available
By default the customer portal unit type list shows "Not available" when a unit type has no more availibilities:
Create a GTM "Custom HTML" tag
<script> setTimeout(function () { var siteMatch = location.pathname.match(/^\/sites\/([\w-]+)$/); if (siteMatch) { document.querySelectorAll('.sgc-main > div > div:nth-child(2):has(>span)').forEach(function (na) { var wl = document.createElement('a'); wl.className = 'btn btn-gray-light px-2 px-md-4 fw-500'; wl.href = 'https://www.spaceup.me?waitlist-for=' + siteMatch[1]; wl.textContent = 'Add to waitlist'; na.replaceWith(wl); // replace all "Non available buttons by a waitlist link }); } }, 100); </script>
note: adjust the href URL above to your website
and 2 triggers:
As a result, the unit types list will now show: