User adoption Report – Salesforce Marketing Cloud

user adoption

Most of the customers need to know user adoption metrics in marketing cloud, however marketing cloud won’t provide those metrics as an OOTB (viz. who are the users last logged in, who are the users are locked out, users BU details, users email details..etc)

So, here is the AMPScript to get above solution done.

<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<title></title>
<meta name=”description” content=””>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
%%[

var @rr, @ID, @Name
set @rr = CreateObject(“RetrieveRequest”)
SetObjectProperty(@rr, “ObjectType”, “AccountUser”)
AddObjectArrayItem(@rr, “Properties”, “Name”)
AddObjectArrayItem(@rr, “Properties”, “CreatedDate”)
AddObjectArrayItem(@rr, “Properties”, “IsLocked”)
AddObjectArrayItem(@rr, “Properties”, “LastSuccessfulLogin”)
set @dataExtensions = InvokeRetrieve(@rr, @rrStatus, @rrRequestID)

output(concat(“rrStatus: “, @rrStatus))
output(concat(“<br>rrRequestID: “, @rrRequestID))

for @i = 1 to RowCount(@dataExtensions) do

set @dataExtension = Row(@dataExtensions, @i)
set @Name = Field(@dataExtension, “Name”)
set @CreatedDate = Field(@dataExtension, “CreatedDate”)
set @IsLocked = Field(@dataExtension, “IsLocked”)

set @Roles = Field(@dataExtension, “LastSuccessfulLogin”)

output(concat(“<br>Name: “, @Name))

]%%

</head>
<body>

<h4>
Name : %%=v(@Name)=%% <br>
CreatedDate : %%=v(@CreatedDate)=%% <br>
IsLocked : %%=v(@IsLocked)=%% <br>

LastSuccessfulLogin : %%=v(@LastSuccessfulLogin)=%% <br>

</h4>
%%[
next @i

]%%
</body>
</html>

Cheers!!!

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Please check your mail for confirmation.

Leave a Comment

Your email address will not be published. Required fields are marked *

Select Language »