I am not sure if I understand the issue correctly, but I think it should be possible to call enableLinkTracking
multiple times.
reported in https://forum.matomo.org/t/enablelinktracking-re-scan-dom-after-content-changes/40269
LGTM, would be good to have a test for it in tests/javascript/index.php
It would be great if someone else could create the test as I don't have a great overview over tests/javascript/index.php and not enough time to more closely look into it.
@Findus23 I reckon it's fine it wouldn't need a test and be quite hard to test actually