302 redirect visitor is matomo instance IP (shortcode plugin)

Hi there. This really isn’t anything related to the plugin but more an nginx / matomo config, hopefully.

The referring visitor IP (mine) shows correctly in nginx and matomo visitor log, when entering via shortcode URL “{tld}/xxxx”. Then when the redirect occurs it shows as the matomo server IP which is the translation from the shortcode TLD. In this case the “original” visitor IP (mine) is not carried throughout.

I do use CF and have realip enabled and a regular website visit with the tracking code shows the real IP, as expected. It is only with that redirect.

Is this perhaps a config error in my nginx or if someone has a known solution I would be really grateful.

Thank you.