Menu

Set Visitor ID

Visitor ID refers to the user's unique identifier (_visitor_id) after installing and before logging in.

      We provide an interface for developers to customize the visitor ID settings. If you have your own visitor management system and need to replace SolarEngine's visitor IDs, you should call it before initializing the SDK.

During data reporting, only the latest visitor ID passed in will be used. Multiple calls should be avoided to prevent abnormal situations where multiple visitor IDs are reported consecutively.

1. Set visitor ID

Function

public void setVisitorID(String visitorID);
ParameterDescriptionTypeRequired
visitorIDVisitor ID to be setStringYes

Sample Code

import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().setVisitorID("xxxVisitorIDxxx");

Note:

  1. This method is used to pass the visitor ID to the SDK and does not report a user login event.
  2. The length of the visitor ID cannot exceed 128 characters, otherwise it will fail to be set.

2. Get Visitor ID

Function

public String getVisitorID();

The current visitor ID shall be returned. (Default "")

Sample Code

import com.reyun.solar.engine.SolarEngineManager;
String visitorID = SolarEngineManager.getInstance().getVisitorID();


Previous
Set Channel Property
Next
Set Account ID
Last modified: 2025-02-06Powered by