Currently, the Matomo Java Tracker application allows for the same query parameter to be added multiple times using the additionalParameters method. However, this behavior is not consistent with the Matomo Tracking HTTP API, as it allows only one occurrence of a parameter.
Proposed Solution:
Modify the Matomo Java Tracker code to enforce a singular occurrence of each parameter in the URL when using the additionalParameters method. This adjustment aligns with common URL parameter practices and helps prevent potential confusion or unexpected behavior.
Additional Information:
Current Behavior:
The additionalParameters method allows the same parameter name to be added multiple times, resulting in duplicate parameters in the URL.
Proposed Behavior:
Update the code to ensure that only one occurrence of each parameter is allowed in the URL when using the additionalParameters method.
Rationale:
Having multiple occurrences of the same parameter in a URL can lead to confusion and is not a standard practice. The proposed modification aims to enhance consistency and adherence to established conventions.
Steps to Reproduce:
Use the additionalParameters method to add the same parameter multiple times.
Note the resulting URL with duplicate parameters.
Expected Result:
The Matomo Java Tracker should restrict the addition of duplicate parameters, ensuring only one occurrence of each parameter in the generated URL.
Additional Comments:
This change will improve the overall usability and conformity of the Matomo Java Tracker, aligning it with widely accepted URL parameter practices.
Currently, the Matomo Java Tracker application allows for the same query parameter to be added multiple times using the
additionalParameters
method. However, this behavior is not consistent with the Matomo Tracking HTTP API, as it allows only one occurrence of a parameter.Proposed Solution:
Modify the Matomo Java Tracker code to enforce a singular occurrence of each parameter in the URL when using the
additionalParameters
method. This adjustment aligns with common URL parameter practices and helps prevent potential confusion or unexpected behavior.Additional Information:
Current Behavior: The
additionalParameters
method allows the same parameter name to be added multiple times, resulting in duplicate parameters in the URL.Proposed Behavior: Update the code to ensure that only one occurrence of each parameter is allowed in the URL when using the
additionalParameters
method.Rationale: Having multiple occurrences of the same parameter in a URL can lead to confusion and is not a standard practice. The proposed modification aims to enhance consistency and adherence to established conventions.
Steps to Reproduce:
additionalParameters
method to add the same parameter multiple times.Expected Result: The Matomo Java Tracker should restrict the addition of duplicate parameters, ensuring only one occurrence of each parameter in the generated URL.
Additional Comments: This change will improve the overall usability and conformity of the Matomo Java Tracker, aligning it with widely accepted URL parameter practices.