Presently, the Matomo Java Tracker library does not enforce the Matomo instance's limitation of five custom variables per request and 100 characters per key and value field. To align with Matomo's specifications, we need to implement a check within the library to ensure that no more than five custom variables and 100 characters are added in a single request.
Expected Behavior:
Upon attempting to add a sixth custom variable in a single request, the system should throw a MatomoException to indicate that the Matomo instance only supports up to five custom variables and 100 characters per request.
Steps to Reproduce:
Add five custom variables using the Matomo Java Tracker library in a single request.
Attempt to add another custom variable within the same request.
Add a custom variable with a key that is longer than 100 characters.
Actual Result:
The library allows the addition of the sixth custom variable without adhering to Matomo's restriction, potentially causing discrepancies.
Expected Result:
The system should throw a MatomoException when attempting to add a custom variable beyond the Matomo instance's limit of five per request.
Additional Information:
Matomo Java Tracker Library Version: 3.1.1
Matomo Instance Version: 4
Note:
By implementing this check, we aim to ensure that the Matomo Java Tracker library aligns with Matomo's specifications, preventing unintended behavior and maintaining compatibility with Matomo instances enforcing the custom variables limit.
Presently, the Matomo Java Tracker library does not enforce the Matomo instance's limitation of five custom variables per request and 100 characters per key and value field. To align with Matomo's specifications, we need to implement a check within the library to ensure that no more than five custom variables and 100 characters are added in a single request.
Expected Behavior: Upon attempting to add a sixth custom variable in a single request, the system should throw a
MatomoException
to indicate that the Matomo instance only supports up to five custom variables and 100 characters per request.Steps to Reproduce:
Actual Result: The library allows the addition of the sixth custom variable without adhering to Matomo's restriction, potentially causing discrepancies.
Expected Result: The system should throw a
MatomoException
when attempting to add a custom variable beyond the Matomo instance's limit of five per request.Additional Information:
Note: By implementing this check, we aim to ensure that the Matomo Java Tracker library aligns with Matomo's specifications, preventing unintended behavior and maintaining compatibility with Matomo instances enforcing the custom variables limit.