How to load Ajax Site Wide? I am trying to open a webform in a modal window through following link, which works fine when I am logged in, but when I logout it simply stops working

&lt;a class="use-ajax" data-dialog-options="{&amp;quot;width&amp;quot;:600}" data-dialog-type="modal" href="/form/call-back"&gt;Get a Call Back&lt;/a&gt;


It seems like we need to load ajax on pages where we want to use this link, so I want to know how can I load ajax sitewide.
Implement hook_page_attachments_alter() like so:

function MODULE_page_attachments_alter(array &amp;$attachments) {
  $attachments['#attached']['library'][] = 'drupal.ajax';
}


The same hook can be implemented in a theme if that makes more sense.