Skip to content

Wie kann ich ein Reservierungs-Widget einbinden? #244

Answered by avoca77
avoca77 asked this question in Q&A
Discussion options

You must be logged in to vote

@zoglo, ich habe jetzt mit der addModule-Methode das Script hinbekommen.

<script>
  document.addEventListener("DOMContentLoaded", function () {
    cookiebar.addModule(16, function () {
      let script = document.createElement('script');
      script.type = 'text/javascript';
      script.src = 'https://domain.tld//widgets/elements.js';
      document.head.append(script);
    }, {
      selector: '#reservierung',
      message: 'Zur Anzeige des Reservierungstools benötigen wir Ihre Zustimmung',
      button: {
        show: true,
        text: 'Akzeptieren und anzeigen',
        type: 'button',
        classes: 'res-btn'
      }
    });
  });
</script>

Habe dazu einen Cookie-Typen Hinweis

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by zoglo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #220 on January 08, 2025 16:17.