This function returns the numeric identifier of the authenticated Marketing Cloud account user who is accessing the page. This is useful when creating customized pages for child Business Units (a feature available in earlier Enterprise 2.0 accounts).
NOTE: This function will only return the correct value in CloudPages when it is first assigned to a variable.
This function does not accept any arguments.
The following example uses the Lookup function on a customized page to conditionally display content based on the Marketing Cloud account user identifier of the user accessing the page (with an active Marketing Cloud session).
%%[ var @EmployeeID, @role set @EmployeeID = AuthenticatedEmployeeID() set @role = Lookup("Employees", "Role", "ID", @EmployeeID) if @role == "Manager" then ]%% <h2>Welcome to the Management Marketing Cloud Portal</h2> <!-- management content here --> %%[ else ]%% <h2>Welcome to the Staff Marketing Cloud Portal</h2> <!-- staff content here --> %%[ endif ]%%
If the Lookup function returns
Manager for the
@employeeId variable, the following content will be displayed:
<h2>Welcome to the Management Marketing Cloud Portal</h2> <!-- management content here -->