Support » Plugin: WP-Matomo Integration (WP-Piwik) » Manual Tracking Code functionality

  • We’d like to track the author of posts in Matomo, but when I switch over from “default tracking” to “enter manual” I lose the ability to also track my logged-in user.

    Is there a better way for me to adjust the tracking script without losing the advanced functionality that this plugin offers? is there any other functionally we loose when switching to manual tracking code?

    for now, this is all we are adding to the tracking code
    (I’ll add a conditional later to only add this on a single-post)

    var article_author = document.querySelector(‘[name=”author”]’).getAttribute(“content”);
    _paq.push([‘trackPageView’, pageTitle, {dimension1: ‘article_author’}]);

    again tracking the author isn’t the issue… its tracking both the author and the logged-in user!

Viewing 1 replies (of 1 total)
  • Plugin Author braekling


    If you want to do further modifications to your tracking code which are not offered by the plugin itself, and which can’t be done via JavaScript via the plugins manual function, I’d suggest to add your tracking code to your site’s footer.php directly, and to disable “add tracking code” within the plugin. There you can embed the JavaScript code and use PHP methods offered by WordPress.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.