To start developing such custom tags, triggers, and variables, make sure to set up your development environment and to create a new plugin as explained in the general setting up guide.
It is a requirement to have the Tag Manager plugin activated. Since Matomo 3.7.0 the plugin is automatically included as part of the Matomo Analytics release.
When you create a new template (a tag, trigger, or variable), please consider contributing this template to the official Tag Manager plugin as we'd like to ship the official plugin with as many templates by default as possible so users don't have to install too many third party plugins.
Alternatively, you may also release a tag or a collection of tags on the Matomo Marketplace. However, much fewer users will be using this template as they have to find and install this plugin which is often not the case.