Is it possible to create the same custom domain across all sites

I have a bunch of WordPress Multi-sites using subdomains. I am tracking each as a separate site in self-hosted Matomo.
The sites are automatically created in Matomo by customising the tracking code via the WordPress plugin.
I have also modified the tracking code to add a custom dimension (visitor ‘role’ when logged in).

But it looks like I have to add the custom dimension to each site manually in the Matomo back end for it to show in reports. Am I missing something?
Is there a way to add the same custom dimension to all sites en masse or automatically?

Via console or directly in the database would be ok.


1 Like

I read an overview of the API, but didn’t see the detailed reference. I should be able to work something up with that.

With the API, you can easily create a custom dimension on a site…