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
174 stars 58 forks source link

MTM does not auto-generate container for first site #600

Closed pbb72 closed 1 year ago

pbb72 commented 1 year ago

When creating a new site in Matomo, a new tag manager container is automatically created. Name: "Default container", description: "This container was auto generated when the website was created." This container automatically has the required tag, variable and trigger for measuring pageviews. However, this is NOT done for the first site on a fresh Matomo install.

As a new user, I would have been helped tremendously if this container was auto-generated for my first site.

Expected Behavior

When creating your first site on Matomo, a tag manager container for that site is automatically created.

Current Behavior

A container and the required tag, trigger and variable for measuring pageviews need to be created manually by the unexperienced Matomo beginner.

Possible Solution

Automatically create the container also for the very first site, just like with any subsequent sites.

Steps to Reproduce (for Bugs)

  1. As a new Matomo user on a fresh install, open tag manager for the first time.
  2. Notice there are no containers. Create your first container.
  3. Notice the container is empty, it does not contain any tags, triggers or variables.

Context

As a new user, I had to spend a considerable amount of time in the documentation and on the forums to figure out how to use the tag manager. (Actually, I'm still struggling, as the tag manager setup only registers a fraction of my visitors, about 10% of what the JS snippet does.)

Your Environment

AltamashShaikh commented 1 year ago

@pbb72 Was the TagManager plugin added after the setup ? How did you add all the plugins ?

pbb72 commented 1 year ago

As far as I can recall, Tag Manager was available when I first logged in. I do remember I had to do some sort of activation or confirmation the first time I used it. (I didn't install our Matomo instance, but I am the only user.)

With regards to plugins, I only installed the Modern theme through the admin interface. Our sysadmin may have installed more plugins, I don't know about that.

AltamashShaikh commented 1 year ago

@pbb72 So the plugin is activated after setup in most of the cases and due to which the hook to create default container never runs maybe we can try to run the hook after plugin activate for all the measurables

AltamashShaikh commented 1 year ago

@pbb72 I have added this issue for prioritisation, our product team will check and take a call on this.

MatomoForumNotifications commented 1 year ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/combining-tag-manager-and-javascript-tracker/49484/9

AltamashShaikh commented 1 year ago

@pbb72 FYI #606 was merged and should be released with Matomo v4.13.4

MatomoForumNotifications commented 1 year ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/pas-de-container-par-defaut-pour-les-sites-intranet/50477/2