setUserMail

❗️

Deprecated

This method is no longer recommended. Audience Manager is no longer available in the latest product version.

The setUserMail() method sets a user email. The email can be sent to Audience Manager with a screen view or other event. The email enriches the user profile in Audience Manager and helps to recognize events belonging to the same user (only in the user profile in Audience Manager, but not in Analytics).

Syntax

getTracker().setUserMail("userEmail");
getTracker().setUserMail("userEmail");

Parameters

userEmail (string, required)

The user’s email address.

Examples

To set a user’s email address and send it to Audience Manager with a screen view:

getTracker().setUserMail("[[email protected]](mailto:[email protected])");  
TrackHelper.track()  
  .screen("example/welcome")  
  .title("Welcome")  
  .with(tracker);
tracker.userMail = "[email protected]"
TrackHelper.track()
  .screen("example/welcome")
  .title("Welcome")
  .with(tracker);

Notes

  • The user’s email address is used only by Audience Manager. It is visible in Audience Manager > Profiles.
  • The user’s email address won’t be sent if setAnonymizationState(true) is set.