Commit 0b9846c7 by liuxiaoxing

预约归因逻辑

parent 27a48cd5
...@@ -38,8 +38,8 @@ ry_adplan_name = 'c测试1' ...@@ -38,8 +38,8 @@ ry_adplan_name = 'c测试1'
ry_adcreative_name = 'c测试1' ry_adcreative_name = 'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销 # bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int' pid = 'rryingxiao_int'
# URL = 'http://uri6.com/tkio/JFFnQ3a?noredirect=true' URL = 'http://uri6.com/tkio/ieMryea?noredirect=true'
URL = 'http://52.80.137.106:8083/tkio/FrEBnea?noredirect=true' # URL = 'http://52.80.137.106:8083/tkio/mYrAzqa?noredirect=true'
# 测试头条衍生事件回调时加上 # 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D # callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
...@@ -60,7 +60,7 @@ def computeMD5upper(message): ...@@ -60,7 +60,7 @@ def computeMD5upper(message):
return m.hexdigest().upper() return m.hexdigest().upper()
appkey = 'a57ba9d2c364a49f43f59cb33d96577e' appkey = '8a390227254c03dbcaddbca009cd6e8b'
lst = [] lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0 s = 0
...@@ -77,7 +77,7 @@ for index in range(1): ...@@ -77,7 +77,7 @@ for index in range(1):
# adid = '5011813780042235' # adid = '5011813780042235'
p1 = ''.join(str(random.choice(range(10))) for _ in range(12)) p1 = ''.join(str(random.choice(range(10))) for _ in range(12))
accountid = ''.join(str(random.choice(range(10))) for _ in range(12)) accountid = ''.join(str(random.choice(range(10))) for _ in range(12))
# accountid = '032273574734' # accountid = '0426886726981'
# p1 = '测试一下' # p1 = '测试一下'
# "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83', # "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83',
# "idfa": '00000000-0000-0000-0000-000000000000', # "idfa": '00000000-0000-0000-0000-000000000000',
...@@ -126,11 +126,11 @@ for index in range(1): ...@@ -126,11 +126,11 @@ for index in range(1):
# 'ry_adplan_name': ry_adplan_name, # 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name, # 'ry_adcreative_name': ry_adcreative_name,
# 投放广告详情相关指标,以下四个指标相关联 # 投放广告详情相关指标,以下四个指标相关联
# "ry_adgroup_id": ry_adgroup_id, "ry_adgroup_id": ry_adgroup_id,
# "ry_adplan_id": ry_adplan_id, "ry_adplan_id": ry_adplan_id,
# "ry_adcreative_id": ry_adcreative_id, "ry_adcreative_id": ry_adcreative_id,
# # 账户id # 账户id
# "accountid": accountid "accountid": accountid
# 'imei2': 'null', # 'imei2': 'null',
# 'meid': i # 'meid': i
# 'bd_vid': i # 'bd_vid': i
...@@ -279,7 +279,7 @@ for index in range(1): ...@@ -279,7 +279,7 @@ for index in range(1):
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# event = 'event_30' # event = 'event_24'
# time.sleep(3) # time.sleep(3)
# try: # try:
# allEvent().ziding_event(i, ip, appkey, event) # allEvent().ziding_event(i, ip, appkey, event)
......
...@@ -77,6 +77,7 @@ class allEvent: ...@@ -77,6 +77,7 @@ class allEvent:
# "_campaignid": 'default', # "_campaignid": 'default',
"_deviceid": i, "_deviceid": i,
"_imei": i, "_imei": i,
"_meid":i,
"mobdna_info": "{\"mobdna_oid\":\"95820f88217ec8cbdf621919bb81c0a5\",\"mobdna_appkey\":\"16dc0cb882d3dbec4f7f66251a84d6dd\",\"mobdna_rdid\":\"96AD0BC02C70D0BA5C446C12580E3800\",\"mobdna_requestid\":\"463cfd5564d24d30a607a18a1e8ae2d8\"}", "mobdna_info": "{\"mobdna_oid\":\"95820f88217ec8cbdf621919bb81c0a5\",\"mobdna_appkey\":\"16dc0cb882d3dbec4f7f66251a84d6dd\",\"mobdna_rdid\":\"96AD0BC02C70D0BA5C446C12580E3800\",\"mobdna_requestid\":\"463cfd5564d24d30a607a18a1e8ae2d8\"}",
# '_oaid': '697134960e9ff8df46f21b4f97db595a1', # '_oaid': '697134960e9ff8df46f21b4f97db595a1',
# "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07', # "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07',
...@@ -268,6 +269,7 @@ class allEvent: ...@@ -268,6 +269,7 @@ class allEvent:
# "_apptype": "wap", # "_apptype": "wap",
'_deviceid': i, '_deviceid': i,
'_imei': i, '_imei': i,
"_meid": "1232112221",
# "_idfv": i, # "_idfv": i,
# '_androidid':i, # '_androidid':i,
'_ip': IP, '_ip': IP,
...@@ -293,8 +295,8 @@ class allEvent: ...@@ -293,8 +295,8 @@ class allEvent:
'context': { 'context': {
# "_apptype": "wap", # "_apptype": "wap",
'_deviceid': i, '_deviceid': i,
# '_imei': i, '_imei': i,
"_idfv": i, "_meid": i,
'_androidid': i, '_androidid': i,
'_ip': IP, '_ip': IP,
'_ryos': ryos, '_ryos': ryos,
...@@ -447,11 +449,11 @@ class allEvent: ...@@ -447,11 +449,11 @@ class allEvent:
'_ryos': ryos, '_ryos': ryos,
"_lib_version": lv, "_lib_version": lv,
'_key_action_category': '1', '_key_action_category': '1',
'_key_action_threshold': '15', # '_key_action_threshold': '15',
# 识别是否为自定义事件,默认传1 # 识别是否为自定义事件,默认传1
'_isreyundefaultevent': '1', '_isreyundefaultevent': '1',
# 'who': 'lxxtest', # 'who': 'lxxtest',
'param7': '5', 'params5': '10',
}, },
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活 #安卓常规渠道激活
appkey = '0ecc232109dc25bfedff8aba06271539' appkey = 'b34100cdf5b586774e5d4dd4357c7b17'
# 线上预约app # 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953 # 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd # 16dc0cb882d3dbec4f7f66251a84d6dd
...@@ -38,8 +38,8 @@ for index in range(1): ...@@ -38,8 +38,8 @@ for index in range(1):
# p = '987654321234567' # p = '987654321234567'
# s = '2321321312h8ro321' # s = '2321321312h8ro321'
i = ''.join(str(random.choice(range(10))) for _ in range(12)) # i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '278623364297' i = 'R2G4QK6J866RLP956230ND71ML1H5UZ0'
# i = '00000000-0000-0000-0000-000000000000' # i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623 # 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
...@@ -48,7 +48,7 @@ for index in range(1): ...@@ -48,7 +48,7 @@ for index in range(1):
# 60.13.148.23 新疆维吾尔自治区吐鲁番市 # 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市 # 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市 # 119.60.0.0 宁夏回族自治区银川市
# allEvent().installUpload(i, ip, appkey) allEvent().installUpload(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
# allEvent().startupEvent(i, ip, appkey) # allEvent().startupEvent(i, ip, appkey)
# # time.sleep(1) # # time.sleep(1)
...@@ -57,7 +57,7 @@ for index in range(1): ...@@ -57,7 +57,7 @@ for index in range(1):
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
allEvent().payorder(i, ip, appkey) # allEvent().payorder(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
......
...@@ -8,12 +8,12 @@ import time ...@@ -8,12 +8,12 @@ import time
#向短链发送点击数据 #向短链发送点击数据
#!!!!分包需要删掉https的s #!!!!分包需要删掉https的s
# URL = 'http://uri6.com/tkio/6RFjMra?noredirect=true' URL = 'http://uri6.com/tkio/VFf22ea?noredirect=true'
URL = 'http://52.80.137.106:8083/tkio/6JZBBva?noredirect=true' # URL = 'http://52.80.137.106:8083/tkio/6JZBBva?noredirect=true'
appkey = 'a57ba9d2c364a49f43f59cb33d96577e' appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# event = 'invoke' # event = 'invoke'
cmpaignid = '1111' cmpaignid = '111'
# 广告创意ID # 广告创意ID
ry_adcreative_id = '9876543' ry_adcreative_id = '9876543'
# 广告组ID # 广告组ID
...@@ -32,8 +32,8 @@ w = 0 ...@@ -32,8 +32,8 @@ w = 0
for index in range(1): for index in range(1):
#随机生成12为数组 #随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = '845285910729' # i = '845285910729'
#随机生成ip #随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '175.93.28.70' # ip = '175.93.28.70'
...@@ -78,13 +78,13 @@ for index in range(1): ...@@ -78,13 +78,13 @@ for index in range(1):
print('imei:', i) print('imei:', i)
print('ip', ip) print('ip', ip)
w = w+1 w = w+1
# time.sleep(8) time.sleep(8)
# try: try:
# allEvent().installUpload(i, ip, appkey, cmpaignid) allEvent().installUpload(i, ip, appkey, cmpaignid)
# except Exception as err: except Exception as err:
# print('install_wrong:', w) print('install_wrong:', w)
# w = w + 1 w = w + 1
# print(err) print(err)
# try: # try:
# allEvent().invoke_test(i, ip, appkey, cmpaignid) # allEvent().invoke_test(i, ip, appkey, cmpaignid)
# except Exception as err: # except Exception as err:
......
...@@ -5,8 +5,8 @@ import random ...@@ -5,8 +5,8 @@ import random
headers = {'Content-Type': 'application/json'} headers = {'Content-Type': 'application/json'}
URL = 'http://52.80.137.106:8080/receive/tkio/' # URL = 'http://52.80.137.106:8080/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/' URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://120.53.212.71/receive/tkio/' # URL = 'http://120.53.212.71/receive/tkio/'
# URL = 'http://tlog.trackingio.com/receive/tkio/' # URL = 'http://tlog.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/' # URL = 'http://jisulog.sortda.com/receive/tkio/'
......
...@@ -5,21 +5,21 @@ import random ...@@ -5,21 +5,21 @@ import random
import time import time
import time import time
#安卓分包激活 #安卓分包激活
appkey = 'a57ba9d2c364a49f43f59cb33d96577e' appkey = 'a4dc9f231c68d496bcdd54af12557ad6'
#57ed2dd31596bb4682471e82c0c73c1a #57ed2dd31596bb4682471e82c0c73c1a
# 4b25b8a4dc584e63e9a7b81c3adedf2f # 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10' # event = 'event_10'
cmpaignid = '1111' cmpaignid = '111'
for index in range(1): for index in range(1):
# 随机生成12为数组 # 随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = 'q27dux0c9d5mv9413cp903d07a8q1ipf' # i = 'q27dux0c9d5mv9413cp903d07a8q1ipf'
# 随机生成ip # 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '143.205.125.236' # ip = '143.205.125.236'
# allEvent().installUpload(i, ip, appkey, cmpaignid) allEvent().installUpload(i, ip, appkey, cmpaignid)
# time.sleep(3) # time.sleep(3)
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
# allEvent().orderEvent(i, ip, appkey) # allEvent().orderEvent(i, ip, appkey)
...@@ -27,7 +27,7 @@ for index in range(1): ...@@ -27,7 +27,7 @@ for index in range(1):
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# allEvent().ziding_event(i, ip, appkey,event) # allEvent().ziding_event(i, ip, appkey,event)
allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# allEvent().invoke_test(i, ip, appkey,cmpaignid) # allEvent().invoke_test(i, ip, appkey,cmpaignid)
print(i) print(i)
...@@ -170,9 +170,9 @@ def send_request(): ...@@ -170,9 +170,9 @@ def send_request():
# 对接se地址 # 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk' # url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试 # 测试
# url = "http://tmtest.trackingio.com/receive/tkiov2/sdk" url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
# 线上 # 线上
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk" # url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['current_event_time'] = int(round(time.time() * 1000))
......
...@@ -124,6 +124,7 @@ def test_at3(): ...@@ -124,6 +124,7 @@ def test_at3():
clickios.parms['ip'] = ip1 clickios.parms['ip'] = ip1
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.send_requestandroid('') clickios.send_requestandroid('')
# clickios.send_requestandroid('&preorder=true')
time.sleep(6) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i
...@@ -162,13 +163,15 @@ def test_at4(): ...@@ -162,13 +163,15 @@ def test_at4():
# 激活的idfa与点击idfa_MD5相同,caid,ip+ua,ip都相同,归因方式为idfa_MD5 # 激活的idfa与点击idfa_MD5相同,caid,ip+ua,ip都相同,归因方式为idfa_MD5
def test_at5(): def test_at5():
i = idfacode() i = idfacode()
i2 = idfacode()
caid = code_nums1(32) caid = code_nums1(32)
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
clickios.parms['idfa_MD5'] = computeMD5upper(i) clickios.parms['idfa_MD5'] = computeMD5upper(i)
clickios.parms['idfa'] = '' clickios.parms['idfa'] = ''
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(6) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i
...@@ -191,7 +194,8 @@ def test_at6(): ...@@ -191,7 +194,8 @@ def test_at6():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -214,7 +218,9 @@ def test_at7(): ...@@ -214,7 +218,9 @@ def test_at7():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -237,7 +243,9 @@ def test_at8(): ...@@ -237,7 +243,9 @@ def test_at8():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -260,7 +268,9 @@ def test_at9(): ...@@ -260,7 +268,9 @@ def test_at9():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(6) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -284,7 +294,9 @@ def test_at10(): ...@@ -284,7 +294,9 @@ def test_at10():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -308,7 +320,9 @@ def test_at11(): ...@@ -308,7 +320,9 @@ def test_at11():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -356,7 +370,9 @@ def test_at13(): ...@@ -356,7 +370,9 @@ def test_at13():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = computeMD5upper(caid) clickios.parms['caid1'] = computeMD5upper(caid)
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(6) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -404,7 +420,9 @@ def test_at15(): ...@@ -404,7 +420,9 @@ def test_at15():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = '' clickios.parms['caid1'] = ''
clickios.parms['caid2'] = computeMD5upper(caid2) clickios.parms['caid2'] = computeMD5upper(caid2)
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -430,7 +448,9 @@ def test_at16(): ...@@ -430,7 +448,9 @@ def test_at16():
clickios.parms['ip'] = ip clickios.parms['ip'] = ip
clickios.parms['caid1'] = '' clickios.parms['caid1'] = ''
clickios.parms['caid2'] = caid clickios.parms['caid2'] = caid
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(6) time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i2 tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i2 tkioreceive.data['context']['_idfa'] = i2
...@@ -663,10 +683,11 @@ def test_at26(): ...@@ -663,10 +683,11 @@ def test_at26():
clickios.parms[ clickios.parms[
'ua'] = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1)' 'ua'] = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1)'
clickios.parms['caid1'] = caid clickios.parms['caid1'] = caid
clickios.send_requestandroid('') # clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(5) time.sleep(5)
tkioreceive.data['context']['_deviceid'] = i tkioreceive.data['context']['_deviceid'] = i2
tkioreceive.data['context']['_idfa'] = i tkioreceive.data['context']['_idfa'] = i2
tkioreceive.data['context']['_ip'] = ip1 tkioreceive.data['context']['_ip'] = ip1
tkioreceive.data['context']['_caid'] = caid tkioreceive.data['context']['_caid'] = caid
tkioreceive.data['context'][ tkioreceive.data['context'][
...@@ -760,6 +781,7 @@ def test_at29(): ...@@ -760,6 +781,7 @@ def test_at29():
# 点击存储 # 点击存储
def test_at30(): def test_at30():
mget = 'b21d0385ad8371de9e90b3e969a5d0c6:'
i = idfacode() i = idfacode()
caid = code_nums1(15) caid = code_nums1(15)
caid1 = code_nums1(36) caid1 = code_nums1(36)
...@@ -772,11 +794,11 @@ def test_at30(): ...@@ -772,11 +794,11 @@ def test_at30():
clickios.parms['caid1'] = caid1 clickios.parms['caid1'] = caid1
clickios.parms['caid2'] = caid2 clickios.parms['caid2'] = caid2
clickios.send_requestandroid('') clickios.send_requestandroid('')
print("idfa:"+i) print("idfa:"+mget+i)
print("idfa_MD5:"+computeMD5upper(i)) print("idfa_MD5:"+mget+computeMD5upper(i))
print("ip:"+ip1) print("ip:"+mget+ip1)
print("caid1:"+caid1.upper()) print("caid1:"+mget+caid1.upper())
print("caid2:"+caid2.upper()) print("caid2:"+mget+caid2.upper())
...@@ -797,3 +819,31 @@ def test_at31(): ...@@ -797,3 +819,31 @@ def test_at31():
tkioreceive.send_request() tkioreceive.send_request()
print(i) print(i)
print(ip1) print(ip1)
# 预约归因-在优先级同样的情况下,优先匹配firstclick
def test_firstclick():
i = idfacode()
i2 = idfacode()
ip1 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
ip2 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
clickios.parms['idfa_MD5'] = computeMD5upper(i)
clickios.parms['idfa'] = i2
clickios.parms['ip'] = ip2
# clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
time.sleep(3)
clickios.parms['idfa'] = i
clickios.parms['ip'] = ip1
# clickios.send_requestandroid('')
clickios.send_requestandroid2('&preorder=true')
time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i
tkioreceive.data['context']['_ip'] = ip1
tkioreceive.send_request()
print(i)
print(i2)
print(ip1)
print(ip2)
\ No newline at end of file
...@@ -23,6 +23,8 @@ parms = { ...@@ -23,6 +23,8 @@ parms = {
# 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287', # 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287',
'ip': ip, 'ip': ip,
'ua': '', 'ua': '',
'subchannel': '2000',
# ios # ios
# Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1) # Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1)
# android # android
...@@ -32,8 +34,8 @@ parms = { ...@@ -32,8 +34,8 @@ parms = {
def send_requestandroid(hc): def send_requestandroid(hc):
# url1 = 'http://52.80.137.106:8083/tkio/BRzAnea?noredirect=true' + hc url1 = 'http://52.80.137.106:8083/tkio/mYrAzqa?noredirect=true' + hc
url1 = 'http://uri6.com/tkio/zaABrya?noredirect=true' + hc # url1 = 'http://uri6.com/tkio/ZFFFVba?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text) print(response.text)
print(url1) print(url1)
...@@ -41,7 +43,7 @@ def send_requestandroid(hc): ...@@ -41,7 +43,7 @@ def send_requestandroid(hc):
def send_requestandroid2(hc): def send_requestandroid2(hc):
url1 = 'http://52.80.137.106:8083/tkio/Jr63yia?noredirect=true' + hc url1 = 'http://52.80.137.106:8083/tkio/ZFFFVba?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/yyuyaea?noredirect=true' + hc # url1 = 'http://uri6.com/tkio/yyuyaea?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text) print(response.text)
......
...@@ -32,10 +32,18 @@ parms = { ...@@ -32,10 +32,18 @@ parms = {
def send_requestandroid(hc): def send_requestandroid(hc):
url1 = 'http://52.80.137.106:8083/tkio/AbEjAza?noredirect=true' + hc url1 = 'http://52.80.137.106:8083/tkio/UvQbUra?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/rEFbiua?noredirect=true' + hc # url1 = 'http://uri6.com/tkio/rEFbiua?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text) print(response.text)
print(url1) print(url1)
return response return response
def send_requestandroid2(hc):
url1 = 'http://52.80.137.106:8083/tkio/ERBbAna?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/rEFbiua?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text)
print(url1)
return response
\ No newline at end of file
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
data = { data = {
"what": "install", "what": "install",
"appid": "0ecc232109dc25bfedff8aba06271539", "appid": "b21d0385ad8371de9e90b3e969a5d0c6",
"context": { "context": {
"_deviceid": "", "_deviceid": "",
"_idfa": "", "_idfa": "",
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
data = { data = {
"what": "install", "what": "install",
"appid": "f461b1ab7aca6fdf3fa719bf4b6af863", "appid": "b34100cdf5b586774e5d4dd4357c7b17",
"context": { "context": {
"_deviceid": "", "_deviceid": "",
"_imei": "", "_imei": "",
......
...@@ -3,11 +3,11 @@ import socket ...@@ -3,11 +3,11 @@ import socket
import struct import struct
import random import random
import time import time
appkey = '1cb67e8beb1fe0d5a9c000f6f05b58e5' appkey = '30a90f0b0cfbde59b206bb046540a17f'
#cid #cid
cid = '21059' cid = '21029'
#surl #surl
surl = 'nEJ77za' surl = 'uEBfIna'
for _ in range(1): for _ in range(1):
# 随机生成12为数组 # 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(28)) i = ''.join(str(random.choice(range(10))) for _ in range(28))
...@@ -17,15 +17,15 @@ for _ in range(1): ...@@ -17,15 +17,15 @@ for _ in range(1):
#打开 #打开
allEvent().openxiaochengxu(i,ip,cid,surl,appkey) allEvent().openxiaochengxu(i,ip,cid,surl,appkey)
time.sleep(5) # time.sleep(5)
#pv # #pv
allEvent().pviaochengxu(i,ip,cid,surl,appkey) # allEvent().pviaochengxu(i,ip,cid,surl,appkey)
# #离开 # # #离开
# allEvent().hidechengxu(i,ip,cid,surl,appkey) # # allEvent().hidechengxu(i,ip,cid,surl,appkey)
allEvent().regedchengxu(i,ip,cid,surl,appkey) # allEvent().regedchengxu(i,ip,cid,surl,appkey)
# # time.sleep(2)
# # allEvent().loggedinchengxu(i,ip,cid,surl,appkey)
# # time.sleep(2)
# allEvent().paymentchengxu(i,ip,cid,surl,appkey)
# time.sleep(2) # time.sleep(2)
# allEvent().loggedinchengxu(i,ip,cid,surl,appkey) # allEvent().eventchengxu(i,ip,cid,surl,appkey)
# time.sleep(2)
allEvent().paymentchengxu(i,ip,cid,surl,appkey)
time.sleep(2)
allEvent().eventchengxu(i,ip,cid,surl,appkey)
...@@ -5,11 +5,12 @@ import random ...@@ -5,11 +5,12 @@ import random
headers = {'Content-Type': 'application/json'} headers = {'Content-Type': 'application/json'}
# 测试环境 # 测试环境
URL = 'http://52.80.137.106:8080/receive/tkio/event' # URL = 'http://52.80.137.106:8080/receive/tkio/event'
# 线上环境 # 线上环境
# URL = 'http://tlog.trackingio.com/receive/tkio/event' # URL = 'http://tlog.trackingio.com/receive/tkio/event'
# URL = 'http://log.trackingio.com/receive/tkio/event' URL = 'http://log.trackingio.com/receive/tkio/event'
# URL = 'http://jisulog.sortda.com/receive/tkio/event'
# 时间和日期 # 时间和日期
when = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())) when = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment