Automatic Setting of goalId
to 0 in Presence of Ecommerce Parameters
#162
Labels
goalId
to 0 in Presence of Ecommerce Parameters
#162
Currently, in the
MatomoRequest
Java class, users need to manually set thegoalId
parameter. However, if any ecommerce parameter is set without updating thegoalId
accordingly, it results in an exception on validation. To prevent such mistakes and enhance user experience, this enhancement request proposes automatic setting of thegoalId
to 0 when any ecommerce parameter is detected.Expected Behavior
When any ecommerce parameter (
ecommerceRevenue
,ecommerceItems
,ecommerceSubtotal
,ecommerceTax
,ecommerceShippingCost
,ecommerceDiscount
,ecommerceLastOrderTimestamp
) is set, theMatomoRequest
class should automatically set thegoalId
to 0.Use Case
This enhancement is essential for scenarios where ecommerce data is being tracked. Automatic adjustment of the
goalId
ensures consistent and accurate representation of data in analytics.Implementation Suggestion
Add a conditional check in the
MatomoRequest
class to automatically detect the presence of any ecommerce-related parameters. If such parameters are present, set thegoalId
to 0.Additional Information
goalId
in ecommerce scenarios.Acceptance Criteria
goalId
should be automatically set to 0.The text was updated successfully, but these errors were encountered: