Skip to content

Should search call both trackPageView and trackSiteSearch? #120

@feedmeastraycat

Description

@feedmeastraycat

Copy of this question

We run a white label Matomo (self hosted) site and use this plugin to connect to it but Im wondering if search page tracking isn’t implemented wrong?

When visiting a search page I can see the following tracker code:

var _paq = window._paq = window._paq || [];
/* tracker methods like “setCustomDimension” should be called before “trackPageView” */
_paq.push(['trackSiteSearch','keyword', false, 1]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);

But according to the integration guide here: https://developer.matomo.org/guides/tracking-javascript-guide

Matomo says:

We recommend not to call trackPageView() on the Site Search Result page

Whenever a search is performed (when activating search tracking) two events are created. A call to tracker.php?search=$keyword and one to tracker.php?action_name=Search.

Is this a bug or a feature somehow? Won't this cause double search hits?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions