iodepo / oih-ui

source code for the Ocean InfoHub (OIH) website
https://oceaninfohub.org/
MIT License
5 stars 4 forks source link

GA4 #72

Open arnounesco opened 1 year ago

arnounesco commented 1 year ago

GA4 should receive information about

Lucy-Scott commented 11 months ago

The analytics solution must enable us to track data from now into the future. Arno - also option to store the data on our server ourselves. can ALSO use GA or another tool.

We need to track

jmckenna commented 11 months ago

Related: Matomo is a very popular analytics tracker, that is free if we host ourselves on IODE server. I think there is no harm in having both GA4 and Matomo running, and, with Matomo we will always have the past data locally (there is no 14-month rule etc).

arnounesco commented 10 months ago

We have to move away from GA if we want stats from all over the world. As far as I know GA will not work for Chinese and Iranian visits and might be a problem for Russian visits in the future. Matomo looks promising to me and is scalable if we would need more in the future.

emarzini commented 10 months ago

We can investigate on it. Anyway some considerations from our side:

emarzini commented 5 months ago

Hi all, here a first approach to define the events fired by React to send to Matomo information related to user actions

Category* Action* Name Description Notes
search simple_search $searchTerm|$region "fired when a search page result is displayed, coming from a SIMPLE search; block on refresh (how???); block on pagination (how???)" convert the "," character -if present- to "[COMMA]"
search advanced_search $searchTerm|$region|$params "fired when a search page result is displayed, coming from an ADVANCED search; block on refresh (how???); block on pagination (how???)" convert the "," character -if present- to "[COMMA]"
search sorted_search $searchTerm|$region|$typeOfSearch|$oldSortingCriterion|$newSortingCriterion|$params fired when a "sorting" dropdown is used to change to a different sorting criterion "convert the "","" character -if present- to ""[COMMA]""; $typeOfSearch = simple OR advanced OR refined"
search refined_search $searchTerm|$region|$typeOfSearch|$oldParams|$newParams "fired when a search page result is displayed, coming from a previous search, AFTER changing the applied facets or applying new ones; block on refresh (how???)" "convert the "","" character -if present- to ""[COMMA]""; $typeOfSearch = simple OR advanced OR refined"
search change_result_page $searchTerm|$region|$typeOfSearch|$oldPageNumber|$newPageNumber "fired when a search page result is displayed, coming from a pagination click event block the standard simple_search or advanced_search event (how???); block on refresh (how???)" "convert the "","" character -if present- to ""[COMMA]""; $typeOfSearch = simple OR advanced OR refined"
click click_on_result $destination_URL|$result_position|$current_page_number|$total_pages|$querystring_with_search_and_facets fired when the title of a result item in the search result page is clicked convert the "," character -if present- to "[COMMA]"
click click_on_jsonld $destination_URL|$result_position|$current_page_number|$total_pages|$querystring_with_search_and_facets fired when the jsonld button of a result item in the search result page is clicked convert the "," character -if present- to "[COMMA]"
misc page_refresh $currentUrl fired on page refresh (how???) convert the "," character -if present- to "[COMMA]"
emarzini commented 5 months ago

@arnounesco we are ready to start the development of the above approach. Please give your feedback if you think adjustments are needed.