What does a variable have to return so that a custom dimension referencing that variable will not be set at all (instead of with an empty value)?

Dimension5 and 9 in the screenshot of a PP Analytics request reference PP TM variables which return undefined in some cases.
In these cases, I would find it cleaner if PP TM did not set these dimensions at all instead of setting them to empty values:


How can I achieve that?
Are there any repercussions when setting empty custom dimensions?

Hi @loldenburg,

The only way would be simply not setting the variable when there’s no value but that’s not really possible when using tag templates.

When it comes to the result - it will be set to No data in Analytics.

image

Thanks!
That’s not good design imho.