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

Update footer datahub stats to use number of site users #3

Open
ChasNelson1990 opened this issue Dec 5, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request low-priority

Comments

@ChasNelson1990
Copy link
Member

Problem

In our footers we show the data hub stats - great! However, as you can see in this screenshot, it's the number of regsitered users.
image

Most of our clients care more about the number of site users, e.g. non-logged in viewers.

Solution

Can we, in this extension, override https://github.com/fjelltopp/ckanext-fjelltopp-theme/blob/e077a1701ad24c4fa92febd9e8c77f71d67d5838/ckanext/fjelltopp_theme/helpers.py#L42 with a new helper that uses Google Analytics and returns the number of unique visitors to the site?

Considerd Alternatives

No response

@ntwalibas
Copy link
Collaborator

@ChasNelson1990 Yes, that is possible by using the activeUsers metric. Please see https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema, quoted below:

activeUsers: The number of distinct users who visited your site or app.

I will just have to implement it in the existing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority
Projects
None yet
Development

No branches or pull requests

2 participants