matomo-next icon indicating copy to clipboard operation
matomo-next copied to clipboard

Feature: Pass additional parameters on init

Open iamcam opened this issue 3 years ago • 1 comments

It might be nice to have one more optional init param to take an array of push() parameters that's injected into the initialization script. This would be helpful where matomo configs call for additional settings outside the defaults (eg, setting cookie policy for subdomains).

I imagine something along the lines of ...

init(
    ...,
    additionalPushParameters: [
        ['foo', 'bar'],
        ['baz', 'boop']
    ]
);

...to build:

<!-- Matomo config -->
...
push(['foo', 'bar']);
push(['barz', 'boop']);
...
<!-- end Matomo config -->

iamcam avatar Jan 30 '22 19:01 iamcam

Hello @iamcam PR welcome if you're still in need for this

revolunet avatar Apr 17 '23 09:04 revolunet