Node page views with query string parameters are ignored

Created on 7 January 2016, almost 9 years ago
Updated 10 July 2023, over 1 year ago

The counts for node page views are taken from views of the exact URLs for the node system path (node/XX), node alias, with & without language prefixes, etc, but any hits for node URLs that have arbitrary query string parameters (e.g. after email campaigns that commonly add utm_* parameters, for example) will not be matched.

The attached patch resolves this, by adding a new (indexed) field to the google_analytics_counter table, that holds the parsed path element of the URL received from GA, which can be easily queried against. It means some denormalisation, but allowing much better querying. I'm not sure of a better way of resolving this without refactoring the way the module processes & stores the rest of its data.

πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom james.williams

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.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    Because of the Universal Analytics shutdown, version 7.x-3.x is no longer supported.
    As Drupal 7 EOL is close, please consider upgrading to the latest Drupal and latest version of this module with Google Analytics 4 support.
    If you are still here and experiencing problems with the latest version using GA4, then please open an issue about it.

Production build 0.71.5 2024