• Resolved webbbio

    (@webbbio)


    This is my first time learning about Matomo but I really like what I see so far.
    My client has asked to move from GA4 to Matomo in wordpress and setup server side tag. I have never done it so no idea how it works. As I understand, once I install Matomo wordpress plugin, I need to download matomo-php-tracker from github, upload files to plugins folder? and then add require_once(“MatomoTracker.php”); in wp-config? Or this cannot be done in wordpress plugin and I need to install on-premise?

    Please tell me a quick overview of the correct procedure, so I can search more information about it and maybe find a tutorial.
    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Hi @webbbio, to implement server side tracking you will have to write the PHP tracking code yourself using the library you link to (the Matomo PHP Tracking Client). This means, hooking into WordPress, creating a new instance of a MatomoTracker class, configuring it, and sending a tracking request. Note that the PHP API is blocking (it waits until it gets a response from Matomo before continuing), so it should be done as far to the end of the WordPress request as possible so it doesn’t slow down your frontend. You will also want to make sure AJAX requests and REST requests are ignored.

    It may be a lot of work, especially if you have not done PHP or WordPress development before. Unfortunately, there is nothing currently that will automatically do this work for you in WordPress.

    Plugin Support dizzyatinnocraft

    (@dizzyatinnocraft)

    Hi @webbbio, do you still need help?

    Thread Starter webbbio

    (@webbbio)

    No. Thank you for the quick support.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Question about server side tagging’ is closed to new replies.