Send Custom Dimension as Pageview (not Event)

Created on 2 August 2021, over 3 years ago
Updated 8 March 2023, almost 2 years ago

Problem/Motivation

When adding Custom Dimensions (CD) (and probably Custom Metrics too), they are sent to Google Analytics as an Event. If you are filtering by pageviews or any place in Behavior, the Custom Dimensions are null. The only place you can retrieve the values are in Events.

So I think it would be best to have an option to send with a page view as many CDs are not events.

I found this support forum going over different ways to send a CD. https://support.google.com/analytics/thread/41497070/sending-custom-dime...

Steps to reproduce

View DOM. E.g. gtag("event", "custom", {"NID":"1789","non_interaction":true});

Proposed resolution

IDK

Remaining tasks

Everything

User interface changes

NA

API changes

Data model changes

NA

✨ Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States johnsicili Phoenix

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.

  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    Rerolled, conflicted on the update function. Note that this means that the previous update function did not run for you if you did run it manually (google_analytics_update_8401, removing the premium and ua_legacy settings), so you should do that manually.

    Also, the 8402 update function will rerun again and disable this setting again if you have it enabled.

  • πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

    I was just looking into this because I have no idea how or why the custom metrics & dimensions are useful.

    In Drupal 7 they were passed as config. In D8 it's a custom event. When they're baseline config, all events inherit the values.

    Could that be the loss of functionality, here?

Production build 0.71.5 2024