Setting goals without using tag manager?

Hello, I am using PiwikPro without the tag manager (want to keep it that way) with this code only:

<script type="text/javascript">
    var _paq = _paq || [];
    (function() {
        var u = "";
        _paq.push(["setTrackerUrl", u + "ppms.php"]);
        _paq.push(["setSiteId", "XXX-XXX-XXX-XXX-XXX"]);
        var d = document,
            g = d.createElement("script"),
            s = d.getElementsByTagName("script")[0];
        g.type = "text/javascript";
        g.async = true;
        g.defer = true;
        g.src = u + "ppms.js";
        s.parentNode.insertBefore(g, s);

Is it possible to add some code to set up these 2 kind of goals"

  • track users who click on a mailto link
  • track users who click on a phone number

Or is setting up these goals only possible within the tag manager?

Thanks for the help!

Best Wishes,

it is possible to set it up using our JS tracking API.
Here’s a link to our documentation: API — Piwik PRO Analytics Suite 16.40 documentation


Thank you for your help. I already read those docs, but don’t know how to use it… :slight_smile:

So for example if I want to track on this page:
Contact Foto Loek

how to set it up excactly?

Hey, there you have a more detailed example → Guides — Piwik PRO Analytics Suite 16.40 documentation
You need to hardcode it on your webpage, each time someone click on en element an _paq.push method is used that will send the data to Piwik. The custom event needs some arguments to be later dispaled correctly in Analytics module. Here is how custom event tag works in Piwik PRO Tag Manager - Custom event tag | Piwik PRO help center With using _paq.push you are doing the same thing but manually. You might need a help of a developer to set it up on your page.