I need to measure page load time of my web page so i installed Google Tag Manager on it.
On the web of Google Tag Manager y did the required configurations an some time later I saw the data on the charts, but the page load time variable was undefined.
To simplify things, I rewrote the Custom Variable Javascript Function to a simple one:
function(){return 1;}
And it still returns undefined
The example function from the tool tip does same.
I check the value using the preview mode and i do see how it updates when reloading my web page.
I tried more functions and changing the triggers, in a different PC even.
If I change the Custom Variable type from Javascript Function to a Constant type, for example, it does works, but when using Javascript Function, it does not, always undefined.