Open
Description
As explained in this comment: #779 (comment)
It seems that the error occurs with personal accounts: @gmail.com, with professional accounts it works correctly.
To fix this error, add these instructions:
if(api.tracker.globals.length == 0 && GLOBALS !== "undefined" && GLOBALS.length > 11) api.tracker.globals = GLOBALS;
to the function: api.get.user_email
api.get.user_email = function() { if(api.tracker.globals.length == 0 && GLOBALS !== "undefined" && GLOBALS.length > 11) api.tracker.globals = GLOBALS; let user_email = api.tracker.globals[10]; if (user_email) { return user_email; } const elements = document.getElementsByClassName("eYSAde"); for (const el of elements) { if (el.innerHTML.indexOf("@") === -1) { return el.innerHTML; } } return null; };
Location: api.get.user_email
There is a simple fix explained in the comment that worked for me. Just wanted to make a separate issue to make sure this doesn't fall through the cracks 😉
Problem
The api.get.user_email
method always returns null
Testing Conditions
Problem can only be reproduced by using a gmail account ending in @gmail.com
.
Metadata
Metadata
Assignees
Labels
No labels