Skip to content

Update Matomo tracking pixel URL to add missing data #1647

@cbunicef

Description

@cbunicef

Currently the Matomo tracking pixel implementation only uses the required arguments:

<img src="/analytics/matomo.php?idsite=51&rec=1" style="border:0" alt="" />

In Matomo we are missing certain information when it comes from tracking pixel hits (presumably, sometimes it is hard to tell):

  • Page Title
  • Page URL (in some cases, this happens with feature phones so I assume related to pixel tracking + some other effect)
  • Referrer (I think?)
  • etc

Here are Matomo's recommended arguments for the HTTP API (this is directly linked from the pixel tracking documentation so I assume it also applies):

action_name (recommended) — The title of the action being tracked. For page tracks this is used as page title. If enabled in your installation you may use the category tree structure in this field. For example, “game / register new user” would then create a group “game” and add the item “register new user” in it.
url (recommended) — The full URL for the current action.
_id (recommended) — The unique visitor ID, must be a 16 characters hexadecimal string. Every unique visitor must be assigned a different ID and this ID must not change after it is assigned. If this value is not set Matomo (formerly Piwik) will still track visits, but the unique visitors metric might be less accurate.
rand (recommended) — Meant to hold a random value that is generated before each request. Using it helps avoid the tracking request being cached by the browser or a proxy.
apiv (recommended) — The parameter &apiv=1 defines the api version to use (currently always set to 1)

https://developer.matomo.org/api-reference/tracking-api

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions