https://github.com/uniwue-rz/matomo_uniwuetracking
[MIRROR ONLY!] This plugin exposes a custom controller action that provides dynamically generated JS Tracking Code based on the provided location. The generated tracker code submits the visit to the catch-all site as well as the site that matches the user's location best (if any).
https://github.com/uniwue-rz/matomo_uniwuetracking
Last synced: 17 days ago
JSON representation
[MIRROR ONLY!] This plugin exposes a custom controller action that provides dynamically generated JS Tracking Code based on the provided location. The generated tracker code submits the visit to the catch-all site as well as the site that matches the user's location best (if any).
- Host: GitHub
- URL: https://github.com/uniwue-rz/matomo_uniwuetracking
- Owner: uniwue-rz
- Created: 2025-04-02T10:24:44.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T10:28:55.000Z (about 2 months ago)
- Last Synced: 2025-04-02T11:29:56.574Z (about 2 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Matomo UniWueTracking Plugin
## Description
This plugin exposes a custom controller action that provides dynamically generated JS Tracking Code based on the provided location.
The generated tracker code submits the visit to the catch-all site as well as the site that matches the user's location best (if any).
## Shibboleth notice
This plugin's controller action endpoint needs to be publicly available, i.e. bypass the Shibboleth protection.
This protection is defined in Ansible Repository -> Matomo Role -> defaults -> matomo_location_shibboleth.
It is important to update this variable when changing the plugin's name, controller action or the ajax data attribute order below.## Embedding Code
Requirements:
- jQueryCode:
```javascript$.ajax({
data: {
// order is important for Shibboleth bypassing!
"module": "API",
"method": "UniWueTracking.getTrackingScript",
"location": window.location.href
},
url: "<Base-URL of the Matomo Installation>",
dataType: "html",
success: function(script) {
$('body').append(script);
}
});```