The custom field only collects Google pageviews for the site's default language

Created on 28 January 2019, over 5 years ago
Updated 10 July 2023, 12 months ago

Problem/Motivation

The custom field currently saves Google Pageviews for the site's default language only. For example, if the language is set to Spanish (See /admin/config/regional/language), the pageview will be added to the Spanish path in Drupal. See screenshots below for complete information.

Proposed resolution

Since Google's Pageviews are a sum of page paths irregardless of language, redirect, typo etc, the Drupal resolution should be the same as the Google resolution: that is, the Pageview is language agnostic. See Sum of pageviews not working β†’ For more information on what Google calls a pageview, and what this module calls a pageview.

Remaining tasks

This isn't a bug, so much as feature that needs to be written.

User interface changes

None. Users who have only one language on their site will be unaffected.

API changes

None

Data model changes

The missing row(s) will need to be stored in Drupal. However the contents of the row will be created from data that's already been collected from Google.

For example, the language is in Spanish, so the custom field value is also in Spanish. Like so:

Rows need to be add for any other languages on the site. The value in those rows should be the same as the value in Spanish. That's how Google does it. That's how we'll do it in Drupal.

(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

πŸ“Œ Task
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States esod

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 8.x-3.x is no longer supported.
    Right now, it collects data for every languages. If you are still here and experiencing problems with the latest version using GA4, then please open an issue about it.

Production build 0.69.0 2024