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

Detect consent managers on the selected site and show a setup link #19789

Closed
wants to merge 7 commits into from

Conversation

bx80
Copy link
Contributor

@bx80 bx80 commented Sep 29, 2022

Description:

This PR adds a new 'challenge' to the 'Become a Matomo Expert' widget which is part of the Tour plugin. It will check for popular consent managers installed on the currently selected site and if detected will show a link to an FAQ showing how to integrate them with Matomo. Additionally it will check to see if the integration code is present on the website and if so automatically mark the challenge as complete.

A bit more detail:

When the Challenge object is constructed it will perform a simple cURL request to grab the current site main URL into a string and then check this against a known list of consent manager identifiers.

There are three possible outcomes:

  1. No consent manager is detected on the website - if this happens the challenge constructor will use the new Challenge::isDisabled() method to disable itself and it will not be shown on the widget.
  2. A consent manager is detected, but no integration code was detected - the challenge will be shown on the widget as uncompleted.
  3. A consent manager is detected and the integration code is detected - the challenge will be shown on the widget as completed.

The known consent managers are stored in a assoc array with detection strings and the URL for the guide, this can easily be extended in the future to cover more consent managers.

Currently supported: Osano, Cookiebot, CookieYes, Tarte au Citron, Klaro and Complianz GDPR for WordPress.

The linked guides are not public yet, but the included URLs will point to the correct location when they published.

One issue to consider is that this will cause a page load hit to the tracked website every time the widget is loaded. We could possibly soften this by adding a 'last checked' timestamp somewhere to ensure that we never check more frequently than say every 5 minutes. Another tweak could be to set the last checked timestamp a week(?) into the future if either no consent manager is detected or the consent manager is detected and is connected. Additionally we might want the cURL page load to use a user agent that avoids tracking or at least identifies as a robot of some sort.

Thoughts on this much appreciated!

Ref: DEV-3004

Review

Peter Zhang and others added 4 commits September 21, 2022 11:03
* hot fix give default period

hot fix give default period

* update to user default period

update to user default period

* add default date param in templates

add default date param in templates
…19738)

* Adding the abililty to exclude specific sites from the Vue site selector component.

* Adding more time to make sure that the select is loaded before trying to search.

* Changed things to filter the site on the server side.

* Added a few new test cases.

* Increasing amount of time for test.

* Updated the omnifixture.

* Fixing logic error in view.

* Removed collation from omnifixture since it was causing issues.

* Switching omnifixture back to 4.x-dev version.

* Making just the bare essential changes to make local test fixtures build correctly.

* Updating screenshot of API list.

* revert OmniFixture-dump to 4.x-dev

revert OmniFixture-dump to 4.x-dev

Co-authored-by: Peter <peter@innocraft.com>
@bx80 bx80 added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Sep 29, 2022
@bx80 bx80 added this to the 4.12.0 milestone Sep 29, 2022
@bx80 bx80 self-assigned this Sep 29, 2022
@bx80 bx80 changed the base branch from next_release to 4.x-dev September 29, 2022 05:03
@bx80 bx80 changed the base branch from 4.x-dev to next_release September 29, 2022 05:07
* Added config option to disable archiving for actions goals

* Additionally disable entry page goals archiving if the config option is set

* Use GeneralConfig::getConfigValue to allow support for site specific config settings

* Updated UI test screenshot
@bx80 bx80 added the Needs Review PRs that need a code review label Sep 29, 2022
; By default Matomo will archive data showing the contribution of each action to goal conversions, for sites tracking millions
; of visits with a large number of goals this may negatively impact archiving performance. You can disable archiving of action
; goal contribution here:
disable_archive_actions_goals = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you've got a bit of code from your other PR in here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe this is branched off 4.x-dev not next_release branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was originally branched off 4.x-dev, I did rebase to next_release though, so not quite sure why those other commits are being included.

@bx80
Copy link
Contributor Author

bx80 commented Sep 29, 2022

Closed in favor of 19794

@bx80 bx80 closed this Sep 29, 2022
@bx80 bx80 removed this from the 4.12.0 milestone Sep 29, 2022
@bx80 bx80 added duplicate For issues that already existed in our issue tracker and were reported previously. and removed Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review labels Sep 29, 2022
@bx80 bx80 removed their assignment Sep 29, 2022
@sgiehl sgiehl deleted the consent-manager-challenge branch April 5, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants