Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matomo string value not processed properly #432

Open
1 of 3 tasks
tdymel opened this issue Oct 28, 2021 · 1 comment
Open
1 of 3 tasks

Matomo string value not processed properly #432

tdymel opened this issue Oct 28, 2021 · 1 comment

Comments

@tdymel
Copy link

tdymel commented Oct 28, 2021

I'm submitting a ...

  • bug report

  • feature request

  • question about the decisions made in the repository

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    Im using the the Angulartics2Matomo service to call eventtrack("customAction", { category: "customCategory", value: "someValue" }). This will send an trackEvent to Matomo but the value will be 0. Number values work fine. It looks like there is a conversion problem somewhere, however, the plugin looked fine.

  • What is the expected behavior?
    It should send the value as string value.

  • Environment:

Angular CLI: 12.2.7
Node: 14.18.0
Package Manager: npm 6.14.15
OS: linux x64

Angular: 12.2.7
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.7
@angular-devkit/build-angular   12.2.7
@angular-devkit/core            12.2.7
@angular-devkit/schematics      12.2.7
@angular/cdk                    12.2.6
@angular/material               12.2.6
@schematics/angular             12.2.7
rxjs                            6.6.7
typescript                      4.3.5
@ben33880
Copy link

ben33880 commented Feb 15, 2022

same here ...

in matomo.ts :
// PAQ requires that eventValue be an integer, see: http://matomo.org/docs/event-tracking
if ((properties as TrackEventMatomoProperties).value) {
const parsed = parseInt((properties as TrackEventMatomoProperties).value as any, 10);
(properties as TrackEventMatomoProperties).value = isNaN(parsed) ? 0 : parsed;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants