Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1345848

    Hello dear team, I have to embed an HTML code in the <head> area of ​​my website for my cookie settings. The website (Erecht24) where the code was generated describes the process as follows:

    Um Ihre Dienste nur nach Einwilligung Ihrer Website-Besucher auszuspielen, müssen Sie zuerst den HTML-Code für das Usercentrics-Script in Ihre Website integrieren. Wenn Sie den o.a. Generator durchlaufen haben, erhalten Sie abschließend im Feld Script-Tag für Ihre Website ein Stück HTML-Code, welches wie folgt aussieht:
    <script type=”application/javascript” src=”https://app.usercentrics.eu/latest/main.js&#8221; id=”XXXXXXXXX”></script>
    Anstelle von “XXXXXXXXX” finden Sie Ihre persönliche Settings-ID.
    Diesen HTML-Code kopieren Sie in Ihre Zwischenablage und fügen ihn anschließend in den <head>-Bereich des HTML-Quellcodes Ihrer Website ein, damit die Usercentrics Consent Management Platform (CMP) auf Ihrer Website aufgerufen wird.
    Wichtig: Stellen Sie sicher, dass der HTML-Code für das Usercentrics-Script in jeder Seite Ihrer Website integriert ist, denn Besucher müssen – egal auf welcher Seite sie Ihren Webauftritt betreten – an jeder Stelle die Möglichkeit haben zunächst die Cookie-Einwilligung zu durchlaufen.
    Achtung: Die folgenden Elemente müssen vor allen anderen Skripen im header eingefügt werden und dürfen nicht asynchron geladen werden!

    2. Fügen Sie anschließend diese Tags Ihrem HTML-Header vor allen anderen Scripten hinzu:

    Usercentrics Consent Management Platform (CMP V1):
    <script type=”application/javascript” src=”https://app.usercentrics.eu/latest/main.js&#8221; id=”[IHRE_ID]”></script>

    Smart Data Protector Script:
    <script type=”application/javascript” src=”https://privacy-proxy.usercentrics.eu/latest/uc-block.bundle.js”></script&gt;

    Für eine Verbesserte Performance empfehlen wir Ihnen diese beiden Zeilen ganz oben in ihrem <head> Bereich einzufügen:
    <link rel=”preconnect” href=”//privacy-proxy.usercentrics.eu”>
    <link rel=”preload” href=”//privacy-proxy.usercentrics.eu/latest/uc-block.bundle.js” as=”script”>

    However, I can’t find a way to include the code in this area. when i add a code block in the frontend editor to each page i’m not sure if the cookies are really only activated if the user agrees. With the code block on the landing page, I don’t think it’s in the head area.

    I also tried to include the code in header.php under: /home/www/spreewald-luftaufnahme.de/wp-content/themes/enfold/

    but that didn’t work either. It is also important that the code is preserved when an update comes.

    Can you tell me where I have to embed the code to make it work?

    Thanks! – Noel

    #1345850
    This reply has been marked as private.
    #1345901

    Hi,

    Please try this in your functions.php file:

    function noellmn_add_erecht24_code() {
    ?>
    YOUR SCRIPT GOES HERE
    <?php
    }
    add_action('wp_head', 'noellmn_add_erecht24_code');

    Please add the code to a child theme, otherwise it will be overwritten on updates.

    Best regards,
    Rikard

    #1345906

    Hello,
    But the problem is, as soon as I activate the child theme, all design changes will be deleted from the normal theme. So the website is empty.

    Thanks.

    #1345907

    * Only when I reactivate the normal theme will the content be back. What solution is there?

    #1346031

    Hi,

    I’m not sure I understand the problem, are you saying that you lose all the content from your site if you activate the child? If you are only missing the styling from the parent, then you can import the settings under Enfold->Import/Export->Import Settings From Your Parent Theme.

    Best regards,
    Rikard

    #1346571

    Hello Rikard,
    Unfortunately it did not work. The child theme could be successfully activated and the style was also imported. Then I put the code in the functions.php. added that didn’t work.

    Thanks

    #1346621

    Hi,

    I have added the code for you, please review your site.

    Best regards,
    Rikard

    #1346629

    Hi,
    thank you, it is working!

    #1346669

    Hi,
    Glad Rikard could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Include HTML code in’ is closed to new replies.