Can't get the User Custom Fields

Hello, I am trying to get the data from the custom fields from a member in webflow but I just can get it. Here is the custom code that I am using for trying to see the data in the browser console:

EDITED: Sorry I didn’t read that you have to declare the custom fields IN the Account Page, in order to been called by the Attribute. Once you called this custom fileds in the account page, they are getting by the code.

------------------------------- CODE ---------------------------------------

<script type="module">
import { WfuUserInfo, WfuUser } from ''; 
import { WfuDataBinder } from ''; 

$(function() {
  var membership = new WfuUserInfo({
    userInfoUpdatedCallback: myCallback

async function myCallback(user) {
  // Automatic data-binding using attributes
var dataBinder = new WfuDataBinder({
    user: user

if( {
    console.log(; // Show the current user's email
if(user.user_data_loaded.custom_fields) {
     var collaborator =["collaborator"];
     var projectid =["projectid"];


Glad you got it Miguel!

Correct- Webflow does not directly make the user data available to script for your use, so we have to pull it from the account screen using a bit of creative timing magic.

Note that these fields do not need to be visible, but they must exist in order for the script to access them. You can set display: none, or wrap them in a DIV that hides an entire group of them. This is particularly useful for eg. external system IDs.