Zeichen32 / PiwikCustomOptOut

Create your own piwik opt-out iframe css styles
GNU General Public License v3.0
25 stars 10 forks source link

Matomo 5 compatibility #76

Open snake14 opened 1 year ago

snake14 commented 1 year ago

Dear Matomo Plugin Author, We are excited that Matomo 5.0.0 is on the horizon, and we would greatly appreciate your assistance in ensuring that your plugin remains compatible with this upcoming release. Maintaining compatibility will enable Matomo users to seamlessly use your plugin after they upgrade to Matomo 5. (If the plugin is not updated to be compatible with Matomo 5, then whenever a user will upgrade to Matomo 5, the plugin would be automatically disabled to prevent issues.)

Updating your plugin to be Matomo 5 compatible is a straightforward process and should not require a significant time investment. You can find more information about updating your plugin at: https://developer.matomo.org/guides/migrate-matomo-4-to-5

Thank you for your ongoing support and commitment to the Matomo community. Your contribution is really appreciated!

The Matomo Team

PS: we’re also available to help if you have any question about making the plugin compatible.

I took the liberty of forking this project and making the necessary changes. If you create a 5.x-dev branch, merge my changes into that branch, and create a new release, you should be good to go.

Zeichen32 commented 1 year ago

@snake14 I have tried to update the plugin for Matomo 5, but getting Errors that my Menu classes already exists. It seams that in Matomo 5 the Namespace CustomOptOut is used somewhere else. Do you know if it is a problem to change the Namespace of a plugin?

For this Plugin i will need to change the namespace from

namespace Piwik\Plugins\CustomOptOut;

to:

namespace Piwik\Plugins\PiwikCustomOptOut;
snake14 commented 1 year ago

Hi @Zeichen32 . I apologize for the delay in getting back to you. I didn't see a notification for some reason.

I don't see any problem with you changing the namespace of your plugin.

AltamashShaikh commented 1 year ago

@Zeichen32 Any update ?

Zeichen32 commented 1 year ago

Sorry for the late reply, will push the changes today.

Zeichen32 commented 1 year ago

@snake14 @AltamashShaikh I have pushed the changes and release a new version. Unfortunately it seams I need to change the plugin name as well. If the name is not changes, it will unpackt in the CustomOptOut folder and the errors with duplicated namespace raise again.

I have try different plugin name variants, but all will was rejected. So currently the plugin version 3.0.0 is break and will lead to an error if you activate the plugin.

As for myself I not using matomo or this plugin anymore for a long time. And matomo meanwhile has everything this plugin provide as core features, I think the best would to deprectate this plugin and not release a plugin version for the Mantomo 5.

Do you know any way, to reject a plugin version?

snake14 commented 1 year ago

Thank you for your effort @Zeichen32 . If you feel that all functionality is included in Matomo 5, I don't see any reason not to keep existing Matomo 4 compatible versions and deprecate the plugin going forward. Does that sound right to you @AltamashShaikh ?

As far as removing published 3.x versions of the plugin from the marketplace, I think that @tsteur can remove it.

tsteur commented 1 year ago

I can remove certain versions 👍 . Just let me know what exactly needs to happen

Zeichen32 commented 1 year ago

@tsteur Version 3.0.0 of the plugin need to be deleted. Because this version is broken for Matomo 5.

tsteur commented 1 year ago

That's done @Zeichen32 👍

AltamashShaikh commented 1 year ago

Thank you for your effort @Zeichen32 . If you feel that all functionality is included in Matomo 5, I don't see any reason not to keep existing Matomo 4 compatible versions and deprecate the plugin going forward. Does that sound right to you @AltamashShaikh ?

As far as removing published 3.x versions of the plugin from the marketplace, I think that @tsteur can remove it.

@snake14 Works for me :+1:

Cruiser13 commented 9 months ago

Actually Matomo does not have the features this plugin has. This plugin does allow setting custom CSS foreach different website in matomo. Matomo has one setting for Opt-out styling that does apply to all websites (which is usually not what you want as each website has a different styling).

Any chance to get this compatible with 5.X @Zeichen32 ?

Zeichen32 commented 9 months ago

Matomo has the ability to set the following URL Parameter for each website individual:

To customise the opt-out form you can use the following URL parameters:
backgroundColor, a hexadecimal color string for example ffffff or ddd
fontColor, a hexadecimal color string for example ffffff or ddd
fontSize, a valid CSS font size for example 1.2em, 15pt, 15px or 50%
fontFamily, a string containing only letters, space, or hyphen eg. Lucida, Courier new

https://matomo.org/faq/how-to/faq_25918/

Additional Matomo has support for a complete custom opt out on a javascript base. https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form

"Any chance to get this compatible with 5.X @Zeichen32 ?": In its base the plugin is compatible with 5.X, but the namespace and name of the plugin need to be change. The source code of this plugin is open source so you are free to create a fork of this repository.

Cruiser13 commented 9 months ago

Thanks a lot! That will work. Also thank you very much for creating and maintaining this plugin for the last years. Has been really helpful.