Large amounts of traffic reports Page Title = (not set)

Created on 4 October 2018, about 6 years ago
Updated 6 July 2023, over 1 year ago

We are currently seeing a rather large proportion of traffic reporting Page Title = (not set) in google analytics. Approximately 1/3rd of pageviews are missing a page title, and we know that all of our pages are correctly setting the <title>.

A quick search around the web indicates this is often due to a race condition that may present itself when <title>is printing after the GA script, which I believe is happening by default now when the script is manually attached to 'head_placeholder' via the .module file.

Curious to see if there are any other users experiencing/have experienced this or if there are thoughts about how this could be mitigated - obviously one could overwrite the core html.html.twig file to move <title> to the top, but ideally we'd rather not deviate from core, and that doesn't really help anyone else using the module.

To see if this issue is present for your project, simply filter 'Behavior' -> 'All Pages' by primary dimension 'Page Title' in GA UI - in my case over 34% of traffic is '(not set)'.

πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States trwill

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    With the sunset of legacy google analytics, the 8.x-3.x module is now unsupported. If this is still an issue with the 4.x version, please file a new issue in the queue.

Production build 0.71.5 2024