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

API call Goals.addGoal with matchAttribute=manually requires setting "pattern" AND "patternType" #15675

Open
hermann77 opened this issue Mar 5, 2020 · 1 comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.

Comments

@hermann77
Copy link

If one calls API call Goals.addGoal with "matchAttribute=manually" it's required to set
"pattern"
AND
"patternType"
But these values are not needed on 'matchAttribute=manually'-Goal:

You MUST do this:
curl -i -X POST -d 'module=API&method=Goals.addGoal&idSite=1&name=TestGoal1&description=TestGoalDescr&matchAttribute=manually&allowMultipleConversionsPerVisit=1&pattern=TESTPATTERN&patternType=contains&format=JSON&token_auth=' https://MATOMO-URL.de/index.php

Proposal:
curl -i -X POST -d 'module=API&method=Goals.addGoal&idSite=1&name=TestGoal1&description=TestGoalDescr&matchAttribute=manually&allowMultipleConversionsPerVisit=1&format=JSON&token_auth=' https://MATOMO-URL.de/index.php

Important!!! The goal seams to be created correctly . Hence I would say: not critical.
Version: 3.13.1

@tsteur tsteur added this to the Backlog (Help wanted) milestone Mar 5, 2020
@tsteur tsteur added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels Mar 5, 2020
@tsteur
Copy link
Member

tsteur commented Mar 5, 2020

Thanks @hermann77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Projects
None yet
Development

No branches or pull requests

2 participants