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

Proposal to retrieve count in Piwik/Matomo analytics #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cedfou
Copy link
Contributor

@cedfou cedfou commented Oct 28, 2019

Description

We have developed a Piwik/Matomo analytics module, that included numerous advanced functionalities, including internal search tracking one (based on this doc: https://matomo.org/docs/site-search/ )
BUT, to be allowed to retrieve the correct "count" results value, we need to have a HTML/CSS marker to separate the 'count number' part from the rest of the content.
This submission is a proposal to mark the count result with a surrounding HTML SPAN element for easy retrieval of this value (through a class="stats_count" CSS selector for example).
Important: the same modification (add of SPAN around result number var) should be done in all the other languages files.

REM: another solution could be to split the 'search.results.XXX.found' variables in 2 and add the HTML into the view (but it requires more modifications); it's up to you to decide...

Regards,

We have developed a Piwik/Matomo analytics module, that included numerous advanced functionalities, including internal search tracking one (based on this doc: https://matomo.org/docs/site-search/ )
BUT, to be allowed to retrieve the correct "count" results value, we need to have a HTML/CSS marker to separate the 'count number' part from the rest of the content.
This submission is a proposal  to mark the count result with a surrounding HTML SPAN element for easy retrieval of this value (through a class="stats_count" CSS selector for example).
Important: the same modification (add of SPAN around result number var) should be done in all the other languages files.

REM: another solution could be to split the 'search.results.XXX.found' variables in 2 and add the HTML into the view (but it requires more modifications); it's up to you to decide...

Regards,
@cedfou
Copy link
Contributor Author

cedfou commented Feb 26, 2020

@jkevan

@Fgerthoffert Fgerthoffert requested review from sergehuber and removed request for sergehuber August 27, 2020 14:11
@sergehuber
Copy link

Hi Cédric thank you for the contribution. I'm not sure how much I like the HTML directly in the resource bundle and was wondering if there was another way we could "mark" the value ? I'm not sure the other proposed solution is any better to be honest :)

@cedfou
Copy link
Contributor Author

cedfou commented Sep 7, 2020

Hi Serge, Piwik use CSS selector to retrieve this count value. So all solution that allow that will be OK...
(but current code doesn't permit it)
Regards,

@sergehuber
Copy link

Ok if I understand correctly the "stats_count" could be named differently ? If so we might want to use something that might make more semantic sense like search_result_count and that would potentially conflict less if it's used elsewhere in Piwik ?

@cedfou
Copy link
Contributor Author

cedfou commented Sep 7, 2020

Exact.
The only thing needed for Piwik/Matomo is to be able to select the count result (via CSS selector) separately of other infos.

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

Successfully merging this pull request may close these issues.

2 participants