Analytics
1.7K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Assign a default value to custom dimension?

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

 

 

 

 

We have a Wordpress (WP) app and own build Javascript (JS) app that operate in the same domain and are connected to the same GA property.

The JS sends custom dimensions on every hit to GA, however, WP doesn't send these custom dimensions as such that we are missing rows  in GA reports when the custom dimension is shown and the row contains no custom dimension value.

How to solve this? 

 

In WP it's hard to always send the GA dimensions on a GA hit as we are using a plugin and it doesn't have this option out of the box.

 

Isn't it possible to set a default value in GA when the custom dimension isn't received?

 

In the JS app, I do send the value "(not set)" if the custom dimension has no value, just like GA is doing for their own dimensions.

 

How do you think I can solve this?

1 Expert replyverified_user

Assign a default value to custom dimension?

Top Contributor
# 2
Top Contributor

Hi where do you get the custom dimension from in the first place? This could be a simple matter of using a default value at the source.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan
Marked as Best Answer.
Solution
Accepted by topic author Ed B
November 2016

Re: Assign a default value to custom dimension?

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆
Hi julien,

Hi where do you get the custom dimension from in the first place? This could be a simple matter of using a default value at the source.

What do you mean, what is not clear?

I might not be clear but i tried to explain that the custom dimensions are send by the JS App. Its' hard to send them at source side in the WP app as it's send through a WP plugin. That's why it's desirable to solve it at the GA (target) side

 

Assign a default value to custom dimension?

[ Edited ]
Follower ✭ ✭ ✭
# 4
Follower ✭ ✭ ✭

You can edit the wp plugin code.  It's only php/js combination Smiley Happy

Assign a default value to custom dimension?

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

The problem was/is: I don't control the plugin code that was sending the events to GA.

I did attached a global listener, but also was a bit fragil, so ended up injecting some JS of my own through a plugin and disabled the GA plugin. All works now Smiley Wink