How to install Piwik Pro Tag Manager?

I’m not able to find anywhere if I need to install anything after adding Tag Manager on my website. Or Piwik Pro code snippet is enough.

The tag I’ve created have some unclear data like:

  • JavaScript library address
  • Tracker address

without any information what they are for.

Hi @jcubic,

As soon as you install our tracking container all of our modules are then loaded and can be used. One tracking script covers everything in our toolkit

Ok and How I’m supped to use this code without Tag manager code:

_paq.push(['trackEvent', 'REPL', 'command', command]);

This is part of Tag managar code, I was lucky to find the code snippet. But I don’t see anywhere on the tag manager in Piwik pro dashboard. Why this information is hidden from users?

Hi @jcubic,

If you would like to use functions like the given example of yours:

_paq.push(['trackEvent', 'REPL', 'command', command]);

You should use it in the source code of your website, in most cases it’s in the HTML file or JavaScript logic.

However, if you prefer to use our tag manager, it’s not necessary to use these functions. You can create tags which will cover this logic on your website. Here are useful articles I recommend to read before using our Tag Manager:

No, I can’t use your website to create trigger because you only have very limited number of event triggers. I need to have logic. I don’t want to just add click event to a button on the page.

And my code is how you use tag manager and trigger the event programmatically.

Hi @jcubic,

From what I understand you cannot use our Tag Manager because of lack events you would like to use. In this case, I suggest you to use our React library (you mentioned this is engine used for your website).

Also, for other than React based websites, you can use our JavaScript library which is described here.

You can use it inline HTML, like here:

<button onclick="likePost(); _paq.push(['trackEvent', 'social', 'like-post', 'top-10-attractions-in-london'])">Like</button>

or alternatively, based on various conditions inside of event listener according to your needs:

 element.addEventListener('click', function () {
        if (window.document.title === "XYZ") {
            _paq.push(["trackEvent", "category", "action"])
        } else {
            _paq.push(["trackEvent", "category", "action"])
        }
    });

You just repeated my code snippet in larger chunk of code.

The real problem is where to get tag manger code snipped that defines _paq variable. I’m not able to find it anywhere in dashboard that should have instructions what to do after you created custom events in dashboard.

I also don’t see it in documentation. Is it a hidden knowledge?