-
Notifications
You must be signed in to change notification settings - Fork 58
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
Added the ability to copy triggers and variables #936
Conversation
…f MTM capabilities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snake14 Found 1 edge case
- Copy a trigger
- It will display the success notification with the URL to navigate
- Now delete the new copied variable and you will see the notification still stays and it takes you to an empty edit trigger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snake14 Should we add a note here, explaining that for customVariables if its referring to any other customVariable, that will not be copied ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snake14 Looks good to me left 2 comments rest works as expected.
@AltamashShaikh I don't think that's necessary, because it does copy referenced variables, unless there's a similar one already existing. So, if you're copying to the same container, it reuses the referenced variables. If copying to a different container, it checks if any variables in that container match the referenced variable before making a copy. That's the behaviour for copying containers, tags, triggers, and variables. Is that not the behaviour that you're seeing? |
Thank you for catching that @AltamashShaikh . I updated the view to hide the success notification when I trigger is deleted. I went ahead and applied the same change for containers, tags, and variables as well. |
Okay 👍 |
Description:
This PR adds the ability to copy triggers and variables in Matomo Tag Manager. If the trigger or variable references any variables, it will try to reuse any existing variables. If there aren't any matches in the destination container, it will copy the referenced variables as well.
Fixes: #914 #932
Review