matomo-org / tag-manager

Free Open Source Matomo Tag Manager - A simple way to manage and maintain all of your (third-party) tags on your website.
https://matomo.org
GNU General Public License v3.0
169 stars 58 forks source link

[Enhancement] Tag Manager - Not deleting the related containers when deleting a website view #622

Open SW-Vincent opened 1 year ago

SW-Vincent commented 1 year ago

Matomo Tag Manager containers are currently "linked" to a site view within Matomo UI, while they are actually independant. This can lead (for exemple) to deleting the access to an active container when deleting an inactive website view.

Summary

There are several possible feature scenarios :

I) Simple warning :

When deleting a website view, displaying a message "the following containers will also be deleted if you delete this site" and listing the matching containers

II) Offering to host the container(s) to an other view

A better alternative would be to move the container from one website view to an other. This way there would be no need to implement a new tracking code (which can be a bit bothering/delayed when analytics and dev teams are disconnected). This would require some core dev and reflexion about the UI.

For exemple it could be a pop-up when deleting a website view, displaying a message "the following containers are currently linked to this website, chose which one you want to delete and which one you want to move" with the possibility to drag and drop containers within "delete" or "website 1", "website 2", etc. sections.

Your Environment

AltamashShaikh commented 1 year ago

@SW-Vincent A container is not tied to a website and same container can be used for multiple websites as a siteID in Matomo configuration is configurable Screenshot from 2023-04-19 16-23-03

Can you be more specific on how this will be useful ?

SW-Vincent commented 1 year ago

When accessing containers through the UI (Tag Manager > Manage container), the displayed selection is related to a website (would the matching containers send data to this website or not). Where the container will be accessible only depends on where it was created from.

For the sake of the example lets say i have several websites and I created all containers from the "main" website. The main website is now obsolete and no longer collects data, so i decide to delete it. Unfortunately, one of the containers that has been defined through "obsolete website" is used for other websites and i cannot access it / edit it anymore.

image

I've had this issue once, the support told me there was no workaround at the moment.

An other fix would be making containers account level within the UI.

Stan-vw commented 1 year ago

Seems like a good idea to find a solution for this, thanks for sharing.

AltamashShaikh commented 1 year ago

@SW-Vincent Thanks for the clarification, we have added this task for prioritisation so that our product team can have a look and decide.