RockefellerArchiveCenter/dimes

Page titles not consistently sent to Matomo Analytics

Closed this issue · 0 comments

Describe the bug

We recently switched from using Google Tag Manager to Matomo Tag Manager (PR #552). In implementing, the firePageViewEvent that we created to address Issue #339 (added in PR #349) is not working with Matomo Tag Manager, causing the same issue that we had before with page titles not consistently being set before page title data is available to Tag Manager, which results in page titles that default to the "DIMES: Online Collections and Catalog of Rockefeller Archive Center" that is in index.html.

Testing

In Matomo Analytics Behavior section, compare "Page Title" report with "Pages" report on 11/10/22 or later (date of Matomo implementation), and see that the /index URL has far fewer pageviews than the "DIMES: Online Collections..." page title pageviews.

Use the debug/preview feature in Matomo Tag Manager in the DIMES container to test tags and view the logs and datalayer to see event data.

Impact on your work

This impacts the accuracy of analytics reports that include page titles, although the page URLs are accurate.

Additional context

There are a few options for what is going on:

  1. The firePageViewEvent is not correctly implemented in the DIMES code to push to the Matomo datalayer.
  2. The firePageViewEvent is not set up in Matomo Tag Manager correctly to trigger the pageview tag
  3. There is possibly another solution for Matomo Tag Manager that is different than the Google Tag Manager solution. See Matomo Docs on tracking SPAs
    .