string ANALYSYS_SERVICE_URL = "http://192.168.220.167:8089";
AnalysysCPlusPlusSdk analysys;
analysys.init(ANALYSYS_SERVICE_URL, APP_ID);
analysys.syncCollecter();
string distinctId = "1234567890987654321";
trackPropertie["$ip"] = "112.112.112.112";
bookList[0] = "Thinking in Java";
trackPropertie["productName"] = bookList;
trackPropertie["productType"] = "Java book";
trackPropertie["producePrice"] = (long long)80;
trackPropertie["shop"] = "xx shop";
analysys.track(distinctId, false, "ViewProduct", trackPropertie, "JS");
string registerId = "ABCDEF123456789";
analysys.alias(registerId, distinctId, "JS");
superPropertie["sex"]= "male";
superPropertie["age"]= (long long)23;
analysys.registerSuperAttributes(superPropertie);
profiles["$city"] = "beijin";
profiles["$province"] = "beijin";
profiles["nickName"] = "nickeName123";
profiles["userLevel"] = (long long)0;
profiles["userPoint"] = (long long)0;
interestList[0] = "sports";
interestList[1] = "football";
interestList[2] = "game";
profiles["interest"] = interestList;
analysys.profileSet(registerId, true, profiles, "JS");
profile_age["registerTime"] = "20180101101010";
analysys.profileSetOnce(registerId, true, profile_age, "JS");
analysys.clearSuperAttributes();
superPropertie = (long long)1;
superPropertie["userLevel"]=(long long)0; //用户级别
superPropertie["userPoint"]=(long long)0; ///用户积分
analysys.registerSuperAttributes(superPropertie);
trackPropertie["$ip"]="112.112.112.112"; //IP地址
abookList[0]="Thinking in Java";
trackPropertie["productName"]=bookList; //商品列表
trackPropertie["productType"]="Java book";//商品类别
trackPropertie["producePrice"]= (long long)80;//商品价格
trackPropertie["shop"]= "xx shop"; //店铺名称
analysys.track(registerId, true, "ViewProduct", trackPropertie, "JS");
trackPropertie = (long long)1;
trackPropertie["orderId"]= "ORDER_12345";
trackPropertie["price"]=(long long)80;
analysys.track(registerId, true, "Order", trackPropertie, "JS");
trackPropertie = (long long)1;
trackPropertie["orderId"]= "ORDER_12345";
trackPropertie["productName"]= "Thinking in Java";
trackPropertie["productType"]= "Java book";
trackPropertie["producePrice"]= (long long)80;
trackPropertie["shop"]= "xx shop";
trackPropertie["productNumber"]=(long long) 1;
trackPropertie["price"]= (long long)80;
trackPropertie["paymentMethod"]= "AliPay";
analysys.track(registerId, true, "Payment", trackPropertie, "JS");
analysys.batchCollecter();
analysys.track(registerId, true, "Payment", trackPropertie, "JS");
std::string strErr = e.what();