Skip to content

Commit

Permalink
fix: update matomo native sdk loader with correct setTracerUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSudip committed Feb 4, 2025
1 parent c77df7f commit 614f24b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LOAD_ORIGIN } from '@rudderstack/analytics-js-common/v1.1/utils/constan
function loadNativeSdk(matomoVersion, premiseUrl, serverUrl, siteId) {
window._paq = window._paq || [];
(function (matomoVersion, premiseUrl, serverUrl, siteId) {
let u = serverUrl || '';
let u = matomoVersion === 'premise' ? premiseUrl.replace('matomo.js', '') : serverUrl || '';
window._paq.push(['setTrackerUrl', `${u}matomo.php`]);
window._paq.push(['setSiteId', siteId]);
const d = document;
Expand All @@ -17,4 +17,4 @@ function loadNativeSdk(matomoVersion, premiseUrl, serverUrl, siteId) {
})(matomoVersion, premiseUrl, serverUrl, siteId);
}

export { loadNativeSdk };
export { loadNativeSdk };

0 comments on commit 614f24b

Please sign in to comment.