Hey all. My case is this, i have some links i would like to track on which if I am correct Matomo does automatic, BUT i would like to setup a goal for these link, so when a user clicks on the link i get 1 value in my goal. My question is:
to make sure Matomo tracks my goal without using the maunal method am I allowed to this?
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['trackGoal', 1]); // The goal that tracks the link
(function() {
var u="URL";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 'number']);
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+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
Or should it be elsewhere ?
Hope it is understandable slight_smile: