Skip to content

[BUG] Cannot pass 0 as eventValue #361

@micvm

Description

@micvm

Describe the bug
I would like to send as event value the value 0, but constraints in the TrackingParameterMethod do not allow that and an Exception fires.

Code snippets

MatomoRequest request = MatomoRequest.request().eventCategory("category").eventAction("action")
						.eventValue(Double.valueOf(0)).build();

Expected behavior
Sending the requests succeeds and an event with eventValue=0 is created on matomo.

Additional context
Exception:

org.matomo.java.tracking.MatomoException: Invalid value for e_v. Must be greater or equal than 4.9E-324
	at org.matomo.java.tracking.TrackingParameterMethod.validateParameterValue(TrackingParameterMethod.java:50)
	at org.matomo.java.tracking.QueryCreator.appendParameter(QueryCreator.java:127)
	... 18 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions