Commit 520c120d authored by Thibaud-Vdb's avatar Thibaud-Vdb
Browse files

Merge branch '496-delete-hotjar-script' into 'latest'

Resolve "Delete hotjar script"

Closes #496

See merge request r2devops/hub!288
parents 536f188a 33037491
Loading
Loading
Loading
Loading
+1 −37
Original line number Diff line number Diff line
@@ -89,39 +89,3 @@ function loadListeners() {
    tabbed_2.onchange = resizeFirst;
    window.onresize = resizeListener;
}
 No newline at end of file


<!-- HotJar -->
function hotjar(h,o,t,j,a,r){
    h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
    h._hjSettings={hjid:2507435,hjsv:6};
    a=o.getElementsByTagName('head')[0];
    r=o.createElement('script');r.async=1;
    r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
    a.appendChild(r);
}

/**
 * Explicit consent has been given
 */
const consent = function(state) {
    console.log("Cookie consent has been given");
    hotjar(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=')
}

function consentUpdate() {
    const item = localStorage.getItem("tibrrCookieConsent");
    if (item && new Date().getDate() < parseInt(item))
        hotjar(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=')
}

window.addEventListener('load', () => {
    const cookieButtons = document.getElementsByClassName("tibrr-cookie-consent-button");
    for (let item of cookieButtons) {
        item.addEventListener('click', () => consent(true), false);
    }
});

// We check whether the user has already something in the localStorage for it & so fetch needed plugins
consentUpdate();
<!-- End HotJar -->
+0 −4
Original line number Diff line number Diff line
@@ -31,8 +31,4 @@ The www.r2devops.io site contains a number of hypertext links to other sites, se

– Under Chrome: Click on the menu icon at the top right of the browser (symbolized by three horizontal lines). Select Settings. Click on Show advanced settings. In the “Confidentiality” section, click on preferences. In the “Confidentiality” tab, you can block cookies.  In the “Confidentiality” section, click on preferences. In the “Confidentiality” tab, you can block cookies.

We use Hotjar in order to better understand our users’ needs and to optimize this service and experience. Hotjar is a technology service that helps us better understand our users’ experience (e.g. how much time they spend on which pages, which links they choose to click, what users do and don’t like, etc.) and this enables us to build and maintain our service with user feedback. Hotjar uses cookies and other technologies to collect data on our users’ behavior and their devices. This includes a device’s IP address (processed during your session and stored in a de-identified form), device screen size, device type (unique device identifiers), browser information, geographic location (country only), and the preferred language used to display our website. Hotjar stores this information on our behalf in a pseudonymized user profile. Hotjar is contractually forbidden to sell any of the data collected on our behalf.
For further details, please see the ‘about Hotjar’ section of  [Hotjar’s support site.](https://help.hotjar.com/hc/en-us/categories/115001323967-About-Hotjar)


--8<-- "includes/abbreviations.md"