Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matomo Statistics - use handle in the URL (DSpace7 has UUID) #607

Closed
milanmajchrak opened this issue Apr 8, 2024 · 11 comments · Fixed by #813 or dataquest-dev/dspace-angular#748
Closed

Comments

@milanmajchrak
Copy link
Collaborator

No description provided.

@kosarko
Copy link

kosarko commented Oct 9, 2024

na tohle jsem dneska zapomnel. Tohle se tyka item views, tedy trackovani z FE?

@milanmajchrak
Copy link
Collaborator Author

Rozmýšľam, čo sme chceli touto issue povedať, lebo pri trackovani Matomo requestu sa nepouživa žiadny item/bistream uuid, ani vo v5, ani vo v7.
Nemysleli sme to, že pri logovani štatistik pri sťahovani bistreamov namiesto uuid logovat handle?

@kosarko
Copy link

kosarko commented Oct 16, 2024

co posila FE jako pageview? je tam handle nebo uuid? v5 podle me brala url (kterou vidim v browseru) a ta byla xmlui/handle/xxx/yyy, takze pak muzu nejak v matomu delat pageviews per handle...

co posila BE?

@milanmajchrak
Copy link
Collaborator Author

Už rozumiem. Matomo netrackuje FE requesty, na to tam maju google analytics a na FE sme Matomo neriešili.

Matomo trackuje na BE iba

  • bitstream downloads: dspace-server-webapp/src/main/java/org/dspace/app/rest/BitstreamRestController.java
  • oai requests: dspace-oai/src/main/java/org/dspace/xoai/controller/DSpaceOAIDataProvider.java

@milanmajchrak milanmajchrak self-assigned this Oct 17, 2024
@kosarko
Copy link

kosarko commented Oct 18, 2024

On je tracking-code pro matomo v (lindat-common) footeru, akorat nevim, jestli to tam zustalo i v te dspace verzi a jestli to trackuje neco rozumneho, nebo jestli to udela jen jeden hit pri nacteni footeru. To je jedna cast, druha je, ze by asi bylo lepsi v matomo videt handles nez uuids...

Ad BE tohle

if (StringUtils.isNotBlank(request.getHeader("referer"))) {
matomoRequest.setHeaderUserAgent(request.getHeader("referer"));
}
if (StringUtils.isNotBlank(request.getHeader("user-agent"))) {
matomoRequest.setHeaderUserAgent(request.getHeader("user-agent"));
}
if (StringUtils.isNotBlank(request.getHeader("accept-language"))) {
matomoRequest.setHeaderUserAgent(request.getHeader("accept-language"));
vypada lehce podivne...vsechno setHeaderUserAgent?

@milanmajchrak
Copy link
Collaborator Author

  1. Piwik je vo footeri, len posiela requesty na lindat, dalo by sa to updatnut znova moutnutim footeru.
  2. Rozumiem, vieme zmenit UUID na handle, ale je tam problem, ze by sa tym padom zmenila cela URL. Nebude lepšie spraviť to cez segmenty? Žeby som pridal handle ako Custom Variable do Matomo requestu.
  3. Tak ten setHeaderUserAgent je chyba, fixnem to. Ďakujem za upozornenie

@kosarko
Copy link

kosarko commented Oct 30, 2024

Rozumiem, vieme zmenit UUID na handle, ale je tam problem, ze by sa tym padom zmenila cela URL. Nebude lepšie spraviť to cez segmenty? Žeby som pridal handle ako Custom Variable do Matomo requestu.

segmenty za me nejsou dobra volba viz ufal#957, tam linknuta debata a zejmena

we changed how segments work in 3.12.0, now when you select visits based on a page url, it will return all visits and all page urls these visits did.

nebo https://matomo.org/faq/general/how-do-segments-work-when-segmenting-on-specific-actions-pages-or-events-and-how-do-i-filter-out-any-actions-that-dont-match/

custom variables taky nevypada jako spravna cesta. https://plugins.matomo.org/CustomVariables:

This feature used to be part of Matomo. However, we no longer plan to further develop custom variables and only fix important bugs or security issues and we might stop supporting Custom Variables in the future.
We therefore highly recommend using Custom Dimensions instead which is directly available within your Matomo

Custom Dimensions maybe...zkusim se na to podivat

@kosarko
Copy link

kosarko commented Oct 31, 2024

custom dimensions po kratkym pokusu vypada, ze by melo byt pouzitelny...

@milanmajchrak
Copy link
Collaborator Author

milanmajchrak commented Nov 6, 2024

Je potrebne upraviť footer, aby trackoval správne UI events - vyskúšať pridať posielanie Matomo requests v onInit metode. Ako sa to bude správať pri SSR?

@milanmajchrak milanmajchrak linked a pull request Nov 21, 2024 that will close this issue
@kosarko
Copy link

kosarko commented Nov 21, 2024

Videl jsi tohle?

Supporting analytics services other than Google Analytics
This project makes use of Angulartics to track usage events and send them to Google Analytics.

Angulartics can be configured to work with a number of other services besides Google Analytics as well, e.g. Piwik, Google Tag Manager, or Azure Application Insights to name a few.

In order to start using one of these services, select it from the Angulartics Providers page, and follow the instructions on how to configure it.

The Google Analytics script was added in main.browser.ts instead of the tag in index.html to ensure events get sent when the page is shown in a client's browser, and not when it's rendered on the universal server. Likely you'll want to do the same when adding a new service

z https://github.com/DSpace/dspace-angular/blob/main/docs/Configuration.md

@milanmajchrak
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants