plausible / community-edition

Example Docker Compose setup for hosting Plausible Community Edition
1.28k stars 286 forks source link

Rollup question #165

Closed Filippo-Marcel-Lisuzzo closed 3 days ago

Filippo-Marcel-Lisuzzo commented 3 days ago

Hi everyone, I modified and hosted the tracking script in the domain to obtain the sources as a single domain, is there a way to obtain the sources equal to the realtime of the domain in the rollup? rollup `!function() { "use strict";

var a_1 = window.location, r_1 = window.document, o_1 = r_1.currentScript, l_1 = "https://ENDPOINT.IT/api/event";

function s_1(t, e) { t && console.warn("Ignoring Event: " + t); e && e.callback && e.callback(); }

function t_1(eventName, e) { if (/^localhost$|^127(.[0-9]+){0,2}.[0-9]+$|^[::1?]$/.test(a_1.hostname) || "file:" === a_1.protocol) { return s_1("localhost", e); } if ((window._phantom || window.nightmare || window.navigator.webdriver || window.Cypress) && !window.plausible_1) { return s_1(null, e); }

try {
  if ("true" === window.localStorage.plausible_ignore_1) {
    return s_1("localStorage flag", e);
  }
} catch (t) {}

var i_1 = {};
i_1.n = eventName;
i_1.u = "/" + o_1.getAttribute("data-loc") + a_1.pathname + "?utm_source=" + o_1.getAttribute("data-loc");
i_1.d = o_1.getAttribute("data-domain");
i_1.r = null;
i_1.ua = navigator.userAgent;
e && e.meta && (i_1.m = JSON.stringify(e.meta));
e && e.props && (i_1.p = e.props);

var n_1 = new XMLHttpRequest();
n_1.open("POST", l_1, true);
n_1.setRequestHeader("Content-Type", "text/plain");
n_1.send(JSON.stringify(i_1));
n_1.onreadystatechange = function() {
  if (n_1.readyState === 4 && e && e.callback) {
    e.callback({ status: n_1.status });
  }
};

}

var e_1 = window.plausible_1 && window.plausible_1.q || []; window.plausible_1 = t_1;

for (var i_1, n_1 = 0; n_1 < e_1.length; n_1++) { t_1.apply(this, e_1[n_1]); }

function p_1() { if (i_1 !== a_1.pathname) { i_1 = a_1.pathname; t_1("pageview"); } }

var c_1, u_1 = window.history;

u_1.pushState && (c_1 = u_1.pushState, u_1.pushState = function() { c_1.apply(this, arguments); p_1(); });

window.addEventListener("popstate", p_1);

"prerender" === r_1.visibilityState ? r_1.addEventListener("visibilitychange", function() { i_1 || "visible" !== r_1.visibilityState || p_1(); }) : p_1();

document.addEventListener("click", function(event) { var target = event.target; if (target.matches(".track-click")) { t_1("click", { props: { id: target.id, class: target.className } }); } });

}();`

ruslandoga commented 3 days ago

👋 @Filippo-Marcel-Lisuzzo

This doesn't look like an issue with CE installation :) Please start a discussion instead: https://github.com/plausible/analytics/discussions/categories/self-hosted-support

ruslandoga commented 3 days ago

I don't fully understand your question, but maybe https://github.com/plausible/analytics/discussions/4637 would be relevant.

Filippo-Marcel-Lisuzzo commented 3 days ago

sorry, i've open a new discussion , https://github.com/plausible/analytics/discussions/4637 this is not my situation