public void setVisitorCustomId(String visitorCustomId){
        if (visitorCustomId != null){
            if (visitorCustomId.length() != ID_LENGTH){            
                throw new IllegalArgumentException(visitorCustomId+" is not "+ID_LENGTH+" characters long.");
            }
            // Verify visitorID is a 16 character hexadecimal string
            else if (!visitorCustomId.matches("[0-9A-Fa-f]+")){
                throw new IllegalArgumentException(visitorCustomId+" is not a hexadecimal string.");
            }
        }
        setParameter(VISITOR_CUSTOM_ID, visitorCustomId);
    }
public void setVisitorCustomId ( String visitorCustomId ) { if ( visitorCustomId != null ) { if ( visitorCustomId . length ( ) != ID_LENGTH ) { throw new IllegalArgumentException ( visitorCustomId + " is not " + ID_LENGTH + " characters long." ) ; } else if ( ! visitorCustomId . matches ( "[0-9A-Fa-f]+" ) ) { throw new IllegalArgumentException ( visitorCustomId + " is not a hexadecimal string." ) ; } } setParameter ( VISITOR_CUSTOM_ID , visitorCustomId ) ; }
Set a custom visitor ID for this request. You must set this value to exactly
a {@value #ID_LENGTH} character hexadecimal string (containing only characters 01234567890abcdefABCDEF).
We recommended to set the UserId rather than the VisitorCustomId.
@param visitorCustomId the visitor's custom id to set.  A null value will remove this parameter