Skip to content

url_params on a page track view appear not to be sent to Matomo #34

@fredvd

Description

@fredvd

Filing this issue also on behalf of @ericof because I chatted with him about this.

We've been trying to run some campaigns on the plone.org website, where we link from a twitter/mastodon post to an article on plone.org with url parameters. A link for example would be like this:

https://plone.org/news-and-events/news/2023/plone-6-0-6-released?mtm_campaign=releases&mtm_medium=social

The idea is that matomo picks up the url parameters and counts one hit to the releases campaign for the social media medium. However: Matomo never records this 'hit' . We suspect that volto-matomo in the AppExtra component that gets configured only pushes the href but strips of any url params here:

React.useEffect(() => {
if (href === pathname) {
// a document (content)
trackPageView({ href, documentTitle: title });
}
if (baseUrl !== pathname) {
// a route (utility view)
const action = pathname.split('/')[pathname.split('/').length - 1];
trackPageView({ href: pathname, documentTitle: action });
}
}, [href, pathname, title, baseUrl]);
return <React.Fragment />;
};

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions