Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Häufig verursacht das Anpassen des Scripts keine Probleme, solange das angepasste Skript kein Visuelles Element auf der Seite ist (bspOften, customizing the script does not cause any problems as long as the customized script is not a visual element on the page (e.g. Google Analytics).

Bei der Anpassung von visuellen Elementen wie YouTube besteht dann aber das Problem, dass ein Content Block auf der Seite fehlt. Damit dieses Problem gelöst wird nutzten wir Platzhalter, welche dem Nutzer zeigen, was hier eigentlich dargestellt werden soll.

Wir teilen die Bereiche in einen JavaScript, HTML und Styling Part auf.

1. Skript Part

Der erste Block besteht aus einem normalen script Tag, welches den passenden data-cookieconsent Wert für den Service hat. In unserem Beispiel ist es YouTube Video. Dieses ordnen wir der Kategorie preferences zu.

Dieses Skript hat den However, when customizing visual elements like YouTube, there is a problem that a content block is missing on the page. To solve this problem we used placeholders, which show the user what should actually be displayed here.

We divide the areas into a JavaScript, HTML and styling part.

1. Script Part

The first block consists of a normal script tag that has the appropriate data-cookieconsent value for the service. In our example it is YouTube Video. We assign this to the preferences category.

This script has the type="text/plain" welches vom Browser nichts als JavaScript erkannt wird und deswegen nicht ausgespielt wird.
Sobald die Zustimmung für den Service gegeben wird, ändert sich der type und das JavaScript in den Klammern wird ausgeführt.

In unserem Beispiel wird dann das Youtube iframe in eine von uns erstellten Div mit der Id youtubePlaceholder eingefügt.

Wichtig das Script sollte unter dem HTML Part eingefügt werden. Damit der HTML-Platzhalter vor dem Script geladen wird, da es sonst zu Problemen beim Setzen des Iframes kommen kannwhich is not recognized by the browser as JavaScript and therefore is not played.
As soon as the approval for the service is given, the type changes and the JavaScript in the brackets is executed.

In our example the Youtube iframe is inserted into a div we created with the id youtubePlaceholder.

Important the script should be inserted under the HTML part. So that the HTML placeholder is loaded before the script, otherwise there may be problems when setting the iframe.

Code Block
languagehtml
<script type="text/plain" data-cookieconsent="preferences">
    document.getElementById('youtubePlaceholder').innerHTML = '';
    document.getElementById('youtubePlaceholder').innerHTML += '<iframe class="embed-responsive-item" src="https://www.youtube-nocookie.com" frameborder="0" allowfullscreen=""></iframe>';
</script>

Alternativ kann folgendes Script genutzt werden. Allerdings ist es dann notwendig eine leere Div an der Stelle zu setzten, an der das YouTube Video angezeigt werden sollAlternatively, the following script can be used.However, it is then necessary to set an empty div in the place where the YouTube video should be displayed.

Code Block
<script type="text/plain" data-cookieconsent="preferences">
    document.getElementById('youtubePlaceholder').style.display = 'none';;
    document.getElementById('positionYouTubeVideo').innerHTML = '<iframe class="embed-responsive-item" src="https://www.youtube-nocookie.com" frameborder="0" allowfullscreen=""></iframe>';
</script> 
Code Block
<div id="postitionYouTubeVideo"></div>

2. HTML

Part

Der zweite Block besteht aus einer div mit der Id youtubePlaceholder der Content dieser div wird mit dem YouTube Iframe aus dem ersten Block überschrieben, sobald die Zustimmung für Youtube erteilt ist. Das Hintergrund Bild kann bei Bedarf auch einfach entfernt werden.

  • In Zeile 2-3 ist das YouTube Icon, welches als Hintergrundbild festgelegt wird (Base64 Encoded). Dieses ist in der Vorlage das YouTube Logo, kann aber für andere Services bzw. bei Bedarf beliebig geändert werden.

  • In Zeile 13-16 wird ein Button dargestellt. Per Klick auf den Button öffnet sich das Cookiebanner.

  • In Zeile 17-21 wird ein Button dargestellt, beim klick auf den Button wird Youtube akzeptiert und der Platzhalter verschwindet und wird mit dem richtigen Youtube Video ausgetauscht

    Hier wird die Funktion

    part

    The second block consists of a div with the id youtubePlaceholder the content of this div will be overwritten with the YouTube iframe from the first block as soon as the approval for Youtube is granted.The background image can also be easily removed if needed.

    • In line 2-3 is the YouTube icon, which is set as background image (Base64 Encoded).This is the YouTube logo in the template, but can be changed for other services or as needed.

    • A button is displayed in lines 13-16.Clicking the button opens the cookie banner.

    • In line 17-21 a button is displayed, when clicking on the button Youtube is accepted and the placeholder disappears and is replaced with the real Youtube video

      • Here the function Cookiebot.submitCustomConsent(bool optinPreferences,bool optinStatistics,bool optinMarketing) für genutzt. Dieser wird als Parameter der gewünschte Consent für die jeweiligen Kategorien mitgegeben.Da der Service YouTube der Kategorie Präferenzen zugeordnet wird, wird somit die Funktion folgendermaßen genutzt:
        is used for. The desired consent for the respective categories is given as a parameter.

      • Since the YouTube service is assigned to the preferences category, the function is thus used as follows: Cookiebot.submitCustomConsent(true, Cookiebot.consent.statistics, Cookiebot.consent.marketing)

    Präferenzen

    OptIn in spezifische Kategorie

    Funktion

    to specific category

    Function

    Preferences

    Cookiebot.submitCustomConsent(true, Cookiebot.consent.statistics, Cookiebot.consent.marketing)

    StatistikenStatistics

    Cookiebot.submitCustomConsent(Cookiebot.consent.preferences, true, Cookiebot.consent.marketing)

    Marketing

    Cookiebot.submitCustomConsent(Cookiebot.consent.preferences, Cookiebot.consent.statistics, true)

    Code Block
    languagehtml
    <div id="youtubePlaceholder">
        <img style="width: 100%; height: 100%; object-fit: cover;"
            src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAASwCAMAAADc/0P9AAAAkFBMVEX/////7+//v7//39//r6//f3//T0//Pz//AAD/X1//z8//Dw//b2//j4//Ly//n5//Hx+urq5dXV2Tk5MoKCjX19fy8vJQUFA1NTV4eHjk5OSGhoZCQkLJycm8vLxra2uhoaH/QED/kJD/EBD/8PD/YGD/0ND/sLD/ICD/gID/4OD/wMD/oKD/UFD/MDD/cHAoQPQqAAAZ3ElEQVR4AezBMQEAAADCIPun9l8GYAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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iEjAbxYR+TRe5ec1qrScF/FHMwX0iJjysVZOzL5RnY7N87EpInq6F8AYp6Z87l+5VN9JudTyuSlOjekDAAzxbOlHAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAj9uCQAAAAAEDQ/9d2NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFd7cEACAAAAIOj/63YE6hsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABz5nQC0M0mTMAAAAASUVORK5CYII='>
        <div class="uc-embedding-wrapper">
            <h3>We need your consent to load the Youtube service!</h3>
            <p class="description-text">We use a third party service to embed video content that may collect data about
                your activity. Please review the details and accept the service to watch this video.</p>
            <p class="not-existing-service">This content is not permitted to load due to trackers that are not disclosed
                to the visitor. The website owner needs to setup the site with their CMP to add this content to the list
                of technologies used.</p>
    
            <div class="uc-embedding-buttons">
                <button ontouchstart="Cookiebot.show();"
                    onclick="Cookiebot.show();" class="uc-embedding-more-info">
                    More Information
                </button>
                <button ontouchstart="Cookiebot.submitCustomConsent(true, Cookiebot.consent.statistics, Cookiebot.consent.marketing);"
                    onclick="Cookiebot.submitCustomConsent(true, Cookiebot.consent.statistics, Cookiebot.consent.marketing);"
                    class="uc-embedding-accept">
                    Accept
                </button>
            </div>
            <span></span>
        </div>
    </div>

    3. Styling

    Damit der Platzhalter richtig gestylt ist, wird noch CSS benötigt. Dies kann natürlich beliebig angepasst werden, damit dieses dem Style der Seite entspricht.

    In Zeile 3-6 kann die Breite und Höhe des Platzhalters festgelegt werden.

    In Zeile 34 kann die Farbe des “More Information” Buttons angepasst werden.

    In Zeile 55 kann die Farbe des “Accept” Buttons angepasst werdenFor the placeholder to be styled correctly, CSS is still needed. This can of course be adjusted as desired, so that this corresponds to the style of the page.

    In line 3-6 the width and height of the placeholder can be set.

    In line 34 the color of the "More Information" button can be adjusted.

    In line 55 the color of the "Accept" button can be customized.

    Code Block
    languagecss
    <style>
        #youtubePlaceholder {
            height: 470px;
            width: 100%;
            max-height: 470px;
            max-width: 1000px;
            position: relative;
            display: block;
            margin-left: auto;
            margin-right: auto;
        }
    
    
        .uc-embedding-wrapper h3 {
            color: black;
    
        }
    
        p.description-text {
            color: black !important;
            max-width: 100% !important;
        }
    
        .uc-embedding-more-info {
            text-transform: uppercase;
            cursor: pointer;
            box-shadow: none;
            font-size: 16px;
            display: inline-block;
            height: 45px;
            width: 100%;
            max-width: 230px;
            letter-spacing: 1.2;
            background: #ffffff;
            color: #6E6E6E;
            border: 1px solid #6E6E6E;
            margin: 5px 10px 15px 10px;
            line-height:0px;
        }
    
        .uc-embedding-accept {
            text-transform: uppercase;
            cursor: pointer;
            border: none;
            box-shadow: none;
            font-size: 16px;
            display: inline-block;
            height: 45px;
            width: 100%;
            max-width: 230px;
            padding: 0;
            letter-spacing: 1.2;
            padding-left: 25px;
            padding-right: 25px;
            background: #9b004b;
            color: #fff;
            margin: 5px 10px 15px 10px;
            line-height:0px;
        }
    
        .uc-embedding-wrapper {
            width: 100%;
            height: 100%;
            justify-content: center;
            max-width: calc(100% - 20px);
            max-height: calc(100% - 20px);
            background: rgba(255, 255, 255, 0.75);
            border-radius: 4px;
            box-shadow: 0 3px 6px rgb(0 0 0 / 50%);
            position: absolute;
            padding: 10px;
            top: 50%;
            left: 50%;
            text-align: center;
            font-size: 14px;
            line-height: 20px;
            transform: translateX(-50%) translateY(-50%);
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            flex-direction: column;
            overflow: auto;
            font-family: Arial, Verdana, sans-serif;
        }
    
        .uc-embedding-buttons {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
        }
    
        .uc-embedding-wrapper>h3 {
            margin-top: 0px !important;
            max-width: 100% !important;
        }
    </style>