Tracking customers - optimove-tech/Optimove-SDK-Android GitHub Wiki

Send customer ID to Optimove When

  • Upon user account creation / login
  • Newsletter signup
  • Guest checkout

Stitching visitors to customers

Once the user successfully creates an account, they become an recognized customer.
Use one of the following functions accordingly:

  • setUserId method and pass the SDK ID when an "email address" is not available:
// Call to notify the SDK that the user has a known customer id (aka SDK ID)
Optimove.getInstance().setUserId("<YOUR_CUSTOMERS_SDK_ID>");
  • registerUser method and pass the SDK ID when an "email address" is available:
// Call to notify the SDK that the user has a known customer id (aka SDK ID)
Optimove.getInstance().registerUser("<YOUR_CUSTOMERS_SDK_ID>", "<YOUR_CUSTOMERS_EMAIL_ADDRESS>");

Important Note: We highly recommend apps to send the SDK the SDK ID every time the app starts. It increases the chances of successful tracking of already existing end users. The SDK blocks multiple calls with the same SDK ID and/or Email, so it's perfectly safe to call setUserId/registerUser every time the app starts.

Encrypting SDK ID

If you will be sending encrypted SDK ID, please follow the steps in Reporting encrypted CustomerIDs

Sending emails only to Identified Visitors (non customers)

To send emails to users who are not customers, call the setUserEmail method accordingly:

Optimove.getInstance().setUserEmail("<MY_EMAIL>");

Important Note: The SDK blocks multiple calls with the same Email, so it's perfectly safe to call setUserEmail every time the app starts.

⚠️ **GitHub.com Fallback** ⚠️