PageSourceSearch

https://www.grupogespain.com/js/EnviarPostHog.js?x=20260910101047

js grupogespain.com collected 2026-09-27 01:23:31 UTC 1,736 bytes, 62 lines download raw bytes

1class EnviarPostHog {
2
3    idioma = idio_txt;
4    nombreAgencia = inmonombre;
5    capasPadreAutorizadas = ['.header-menu', '.buscadorRapido', '.buscadorAvanzado', '.modulo-paginacion', '.modulo-mapapropiedades', '.modulo-alerta', '.modulo-valoramostupiso', '.modulo-pie']
6    atributoSeccion = 'seccionPostHog';
7    claseEvento = '.enviarPostHog';
8    atributoEvento = 'nombreEventoPostHog';
9    desactivar = true;
10
11    constructor() {
12        this.cargarEventos();
13        this.throttledProcesarEventos = throttle(this.procesarEvento, 100);
14    }
15
16
17    cargarEventos() {
18        let claseEnviarPostHog = this;
19        document.body.addEventListener("click", event =>
20            this.throttledProcesarEventos(event)
21        , true)
22    }
23
24    procesarEvento(objAccion) {
25        let capasPadreAutorizadas = this.capasPadreAutorizadas.join(',');
26        let capaPadreEvento = $(objAccion.target).closest(this.claseEvento);
27
28        if(capaPadreEvento.length == 0) {
29            return;
30        }
31
32        let $capaPadreEvento = $(capaPadreEvento.get(0));
33
34        let seccion = this.obtenerSeccion($capaPadreEvento)
35        let nombreEvento = $capaPadreEvento.attr(this.atributoEvento);
36
37        this.enviar(seccion, nombreEvento);
38
39    }
40
41    obtenerSeccion($capaPadreEvento) {
42        let capaSeccion = $capaPadreEvento.closest(`[${this.atributoSeccion}]`);
43        return capaSeccion.attr(this.atributoSeccion);
44    }
45
46    enviar(section, action)
47    {
48        if(this.desactivar) {
49            return;
50        }
51
52        let datos = {
53            section: section,
54            action: action,
55            agency: this.nombreAgencia,
56            lang: this.idioma
57        };
58
59        posthog.capture('AgencyWebsite', datos);
60    }
61
62}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.