<aside>
  <div class="single-ad">
    <div class="module module-hotjar" id="module-hotjar">
      <div class="moving-heatmap-area">
        <div class="click-area click-area-1"></div>
        <div class="click-area click-area-2"></div>
        <div class="click-area click-area-3"></div>
      </div>
    </div>
  </div>
</aside>
:root {
  --mouse-x: 100px;
  --mouse-y: 250px;
}

* {
  box-sizing: border-box;
}

aside {
  width: 300px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  height: 100vh;
  flex-direction: column;
  justify-content: center;
}
body {
  margin: 0;
  background: #333;
  font: 12px "Lato", "Lucide Grande", sans-serif;
}

.module-hotjar {
  background: white;
  overflow: hidden;
  height: 300px;
  width: 100%;
  border: 1px solid orange;
}
.moving-heatmap-area {
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/heat-map.png);
  width: 1024px;
  height: 440px;
  box-shadow: 0 0 20px rgba(black, 0.2);
  transform: translate( 
    calc(calc(var(--mouse-x) / 1.5 * -1) + 120px),
    calc(calc(var(--mouse-y) / 2.5 * -1) + 20px)
  );
}

.click-area {
  position: absolute;
  &:hover,
  &:focus {
    border: 1px dashed #5B9FE5;
    &::after {
      display: block;
    }
  }
  &::after {
    pointer-events: none;
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #5B9FE5;
    color: white;
    padding: 0.1rem 0.3rem;
    white-space: nowrap;
  }
}
.click-area-1 {
  left: 28px;
  top: 142px;
  width: 120px;
  height: 20px;
  &::after {
    content: "292 Clicks (39.46%)";
  }
}
.click-area-2 {
  left: 28px;
  top: 162px;
  width: 140px;
  height: 20px;
  &::after {
    content: "187 Clicks (29.31%)";
  }
}
.click-area-3 {
  left: 28px;
  top: 182px;
  width: 170px;
  height: 20px;
  &::after {
    content: "21 Clicks (4.12%)";
  }
}
let root = document.documentElement;
let hotjarGraphic = document.getElementById("module-hotjar");

hotjarGraphic.addEventListener("mousemove", e => {
  console.log(e);
  root.style.setProperty('--mouse-x', e.pageX - hotjarGraphic.offsetLeft + "px");
  root.style.setProperty('--mouse-y', e.pageY - hotjarGraphic.offsetTop + "px");
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.