Tag Manager - All tags deleted during version creation

We created a new version in the MTM after updating triggers to a couple of our tags. After setting this live we noticed that all of the tags (not just the ones that had been edited) in that version had been deleted.

This was fixed simply by creating a new version, in which all the tags had been set to ‘added’ and re-publishing.

Although the issue was fixed easily, we were running the site without tags for a little while so had this not have been spotted we it could have caused us great inconvenience. Is this something anyone has experienced before/something you could fix to prevent it from re-occurring?

Hi Adam,

looked through the code for a while but have no idea how this could happen. Made a minor tweak in Check container version exists before publishing it by tsteur · Pull Request #167 · matomo-org/tag-manager · GitHub but it shouldn’t really change anything. Could you maybe let us know a little more about what you did? Like was maybe someone else from the team working on the same container at the same time? Did you maybe wait for a longer time before creating this new release or something?

Hi Thomas,

Thanks for looking into this. I’m afraid there isn’t much to report other than:

  • Created new triggers/variable and tags.
  • Created new version that showed just the new additions above.
  • Tried to preview the version in debug mode. Note: debugger wasn’t showing on the website in preview mode.
  • Following day go to check tags and all the tags and triggers had been ‘deleted’, but not the new variables, these still show as added.
  • I then went to create a new version which showed all the tags and triggers as ‘added’. Note: debugger still not showing on website in preview mode.

And that is where we are at the moment. Do you have any suggestions as to how to best approach fixing this?


Unfortunately without being able to reproduce it I can’t do much. If you can reproduce this, please let me know the exact steps and I’d be happy to look into it. When you created a new version, do you know if you published a new version or only created a new version without publishing it?

I created a new version without publishing. I now just want to debug it to check the tags work but the debugger will not even load on the website - although I’m not sure this is linked.

Could I share the preview link with you via email and could you have a look to see if you can see the debug mode or see why that isn’t loading?