Can I create a goal and funnels using code?

I have been working on implementing goals and funnels on my company’s website. Currently, I manually add event tracking codes and then configure them on the dashboard. Is there a way to automatically register these goals and funnels on the dashboard through code?

use _paq.push(['trackGoal', 1]);

Manually trigger goal conversions

Do I need to embed any extra code into my website or app to track funnels?

→ No, you only need to configure your funnels in Matomo (Piwik) and that’s it. There is no additional setup needed.

Thank you for your response. My question is whether it’s possible to create goals and funnels using code, without the need for manual configuration in Matomo. I’m interested in automating the goal creation process for multiple goals. Is this achievable through code alone?

Yes, when you can JavaScript coding. except Funnels.

respectively … basically anything can be coded, with JavaScript and PHP.

Hi @Joao_Miguel_Costa
You can create Funnel via HTTP API:
For that, you’ll need an authentication token:

1 Like