Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkio-test-case
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuxiaoxing
tkio-test-case
Commits
e2b61a62
Commit
e2b61a62
authored
May 25, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
receive 对接se
parent
39217a44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
310 additions
and
192 deletions
+310
-192
click.py
android_click/click.py
+20
-20
android_script.py
android_event/android_script.py
+6
-5
android_fenlianjie.py
android_event_case/android_fenlianjie.py
+9
-9
tests.py
android_event_case/tests.py
+7
-0
click.py
fenbao_android_click/click.py
+13
-12
android_fenlianjie.py
fenbao_android_event_case/android_fenlianjie.py
+2
-2
click.py
ios_click/click.py
+18
-17
ios_script.py
ios_event/ios_script.py
+46
-45
ios_fenlianjie.py
ios_event_case/ios_fenlianjie.py
+7
-7
attributioncase.py
microservices/attributioncase.py
+25
-13
attributioncaseios.py
microservices/attributioncaseios.py
+1
-1
channelcallback.py
microservices/channelcallback.py
+37
-0
receiveandroid.py
microservices/receiveandroid.py
+108
-59
receiveios.py
microservices/receiveios.py
+1
-1
redirectandroid.py
microservices/redirectandroid.py
+6
-1
redirectios.py
microservices/redirectios.py
+4
-0
No files found.
android_click/click.py
View file @
e2b61a62
...
...
@@ -14,20 +14,20 @@ import hashlib
# from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据
# 广告创意ID
ry_adcreative_id
=
'
767556
'
ry_adcreative_id
=
'
222
'
# 广告组ID
ry_adgroup_id
=
'
564534
'
ry_adgroup_id
=
'
2222
'
# 广告计划ID
ry_adplan_id
=
'
3453534
'
ry_adplan_id
=
'
22222
'
# 广告组名称
ry_adgroup_name
=
'
snktt-cz
'
ry_adgroup_name
=
'
c测试1
'
# 广告计划名称
ry_adplan_name
=
'
snktt-czx-pt-s
'
ry_adplan_name
=
'
c测试1
'
# 广告创意名称
ry_adcreative_name
=
'
snktt-czx-p
'
ry_adcreative_name
=
'
c测试1
'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid
=
'rryingxiao_int'
URL
=
'http://
uri6.com/tkio/NJVNja
a?noredirect=true'
URL
=
'http://
52.80.137.106:8083/tkio/ZNZv6z
a?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
# URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3'
...
...
@@ -45,7 +45,7 @@ def computeMD5upper(message):
m
=
hashlib
.
md5
()
m
.
update
(
message
.
encode
(
encoding
=
'utf-8'
))
return
m
.
hexdigest
()
.
upper
()
appkey
=
'
8a390227254c03dbcaddbca009cd6e8b
'
appkey
=
'
1be524b1a26b2f3e0ec8708e12369336
'
lst
=
[]
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
s
=
0
...
...
@@ -54,7 +54,7 @@ for index in range(1):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = '
65453434546345
'
# i = '
822976099354
'
o
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
m
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
se
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
@@ -89,7 +89,7 @@ for index in range(1):
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
# 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei'
:
i
,
'imei_MD5'
:
computeMD5upper
(
i
),
#
'imei_MD5': computeMD5upper(i),
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'clickid': '测试测试',
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
...
...
@@ -146,7 +146,7 @@ for index in range(1):
# '_carrier': '1',
# 'syscountryc': '1',
# 'sysrtime': '1',
#
"accountid": accountid
"accountid"
:
accountid
}
# timeout可以超时四秒
# verify = False
...
...
@@ -155,7 +155,7 @@ for index in range(1):
print
(
'imeimd5:'
,
computeMD5upper
(
i
))
print
(
"ip:"
,
ip
)
#
print("accountid:", accountid)
print
(
"accountid:"
,
accountid
)
print
(
p
.
text
)
print
(
p
.
url
)
# print("oaid:",o)
...
...
@@ -174,13 +174,13 @@ for index in range(1):
# print('androidid', a)
w
=
w
+
1
#
time.sleep(10)
#
try:
#
allEvent().installUpload(i, ip, appkey)
#
# allEvent().formevent(i, ip, appkey)
#
#
except Exception:
#
print('install_wrong:', w)
time
.
sleep
(
10
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# allEvent().formevent(i, ip, appkey)
except
Exception
:
print
(
'install_wrong:'
,
w
)
# w = w + 1
#
#
...
...
@@ -258,7 +258,7 @@ for index in range(1):
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_1
7
'
# event = 'event_1'
# time.sleep(3)
# try:
# allEvent().ziding_event(i, ip, appkey, event)
...
...
android_event/android_script.py
View file @
e2b61a62
...
...
@@ -7,7 +7,9 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境
URL_batch
=
'http://10.3.20.42:8080/receive/batch'
URL
=
'http://10.2.20.42:8080/receive/tkio/'
# URL = 'http://10.2.20.42:8080/receive/tkio/'
URL
=
'http://52.81.116.128:18081/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
# URL = 'http://172.31.21.207:8080/receive/tkio/'
...
...
@@ -76,7 +78,7 @@ class allEvent:
"_pkgname"
:
"com.yanjing.yami"
,
# "_campaignid": 'default',
"_deviceid"
:
i
,
"_imei"
:
'E83DC0B76BC1691CB9C45E5A63468660'
,
"_imei"
:
i
,
# '_oaid': '697134960e9ff8df46f21b4f97db595a1',
# "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07',
# 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36',
...
...
@@ -397,9 +399,8 @@ class allEvent:
# 识别是否为自定义事件,默认传1
'_isreyundefaultevent'
:
'1'
,
# 'who': 'lxxtest',
's'
:
'0'
,
'e'
:
'1'
,
'm'
:
'2'
,
'param1'
:
'1'
,
},
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
...
...
android_event_case/android_fenlianjie.py
View file @
e2b61a62
...
...
@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活
appkey
=
'
ae6f9fb7e7bc336bffb63de711c7bec0
'
appkey
=
'
1be524b1a26b2f3e0ec8708e12369336
'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
...
...
@@ -38,21 +38,21 @@ for index in range(1):
# p = '987654321234567'
# s = '2321321312h8ro321'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = '885709229829
'
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'990993451126
'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '1
10.186.108.28
'
# ip = '1
24.158.98.207
'
# 地域测试ip
# 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
time
.
sleep
(
1
)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
#
allEvent().installUpload(i, ip, appkey)
#
time.sleep(1)
#
allEvent().startupEvent(i, ip, appkey)
# # time.sleep(1)
#
allEvent().loginEvent(i, ip, appkey)
allEvent
()
.
loginEvent
(
i
,
ip
,
appkey
)
# time.sleep(1)
# allEvent().registerEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey)
...
...
@@ -61,7 +61,7 @@ for index in range(1):
# time.sleep(1)
# num = index + 1
# event = 'event_' + str(num)
#
# event = 'event_10
'
#
event = 'event_6
'
# allEvent().ziding_event(i, ip, appkey, event)
# print(s)
# s = int(s) + 1
...
...
android_event_case/tests.py
0 → 100644
View file @
e2b61a62
import
random
what
=
[
'install'
,
'event_1'
]
i
=
random
.
choice
(
range
(
2
))
print
(
what
[
i
])
\ No newline at end of file
fenbao_android_click/click.py
View file @
e2b61a62
...
...
@@ -8,11 +8,11 @@ import time
#向短链发送点击数据
#!!!!分包需要删掉https的s
URL
=
'http://uri6.com/tkio/
RZFFFb
a?noredirect=true&callback= http
%3
A
%2
F
%2
Fad.toutiao.com
%2
Ftrack
%2
Factivate
%2
F
%3
Fcallback
%3
DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA
%26
os
%3
D0
%26
muid
%3
D'
URL
=
'http://uri6.com/tkio/
eeQfQz
a?noredirect=true&callback= http
%3
A
%2
F
%2
Fad.toutiao.com
%2
Ftrack
%2
Factivate
%2
F
%3
Fcallback
%3
DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA
%26
os
%3
D0
%26
muid
%3
D'
appkey
=
'
16dc0cb882d3dbec4f7f66251a84d6dd
'
appkey
=
'
8a390227254c03dbcaddbca009cd6e8b
'
# event = 'invoke'
cmpaignid
=
'
233445
'
cmpaignid
=
'
1122
'
# 广告创意ID
ry_adcreative_id
=
'9876543'
# 广告组ID
...
...
@@ -28,7 +28,7 @@ ry_adcreative_name = '广告创意'
s
=
0
w
=
0
for
index
in
range
(
30
):
for
index
in
range
(
1
):
#随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
@@ -41,7 +41,8 @@ for index in range(30):
# accountid = '014067084301'
try
:
parms
=
{
# 'androidid': "43214532142142",
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
# 'androidid': "43214532142142",
'imei'
:
i
,
# "idfa": 'DBC13622-E34B-440C-B7A7-FB6641D0D9AB',
'ip'
:
ip
,
...
...
@@ -76,13 +77,13 @@ for index in range(30):
print
(
'imei:'
,
i
)
print
(
'ip'
,
ip
)
w
=
w
+
1
#
time.sleep(8)
#
try:
#
allEvent().installUpload(i, ip, appkey, cmpaignid)
#
except Exception as err:
#
print('install_wrong:', w)
#
w = w + 1
#
print(err)
time
.
sleep
(
8
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
,
cmpaignid
)
except
Exception
as
err
:
print
(
'install_wrong:'
,
w
)
w
=
w
+
1
print
(
err
)
# try:
# allEvent().invoke_test(i, ip, appkey, cmpaignid)
# except Exception as err:
...
...
fenbao_android_event_case/android_fenlianjie.py
View file @
e2b61a62
...
...
@@ -5,12 +5,12 @@ import random
import
time
import
time
#安卓分包激活
appkey
=
'
16dc0cb882d3dbec4f7f66251a84d6dd
'
appkey
=
'
6012db28b7fbdfcb1e3a847756137f9b
'
#57ed2dd31596bb4682471e82c0c73c1a
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
cmpaignid
=
'1122
33
'
cmpaignid
=
'1122
22
'
for
index
in
range
(
1
):
# 随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
ios_click/click.py
View file @
e2b61a62
...
...
@@ -8,8 +8,9 @@ import string
#向短链发送点击数据
#渠道短链
URL
=
'http://uri6.com/tkio/vMn2eea?callback_param=CL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEAcallback=http
%3
A
%2
F
%2
Fad.toutiao.com
%2
Ftrack
%2
Factivate
%2
F
%3
Fcallback
%3
DCL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEA
%26
os
%3
D1
%26
muid
%3
DA76A313F-A1D6-4BED-8C21-C16B2EEFC618&noredirect=true&ry_dp=true&rydp_path=null&rydp_url=https
%3
A
%2
F
%2
F123&noredirect=true'
appkey
=
'3f2706b7afdf89d95ffa7d2e9cc13e2e'
# URL = 'http://52.80.137.106:8083/tkio/JF7JFja?noredirect=true'
URL
=
'http://uri6.com/tkio/NJVNjaa?noredirect=true'
appkey
=
'017bf97c10d7bc79df1b4ed37e77b283'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event
=
'invoke'
# 广告创意ID
...
...
@@ -59,7 +60,7 @@ for _ in range(1):
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
'idfa'
:
i
,
# 'idfa_MD5': '4f17acf12727bfb060422996db969365',
# 'idfv': 'IFV_
05B50501-E0FC-4B83-BE74-F18ACEDEF37Bwew
',
# 'idfv': 'IFV_
64F5A794-A942-4209-81B0-D28FD01E9287
',
# 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607',
# 'muid':i,
# 'oaid':'654324352124312232',
...
...
@@ -91,14 +92,14 @@ for _ in range(1):
print
(
'idfa:'
,
i
)
print
(
'ip'
,
ip
)
w
=
w
+
1
#
time.sleep(10)
#
try:
#
allEvent().installUpload(i, ip, appkey)
#
# allEvent().formevent(i, ip, appkey)
#
#
except Exception:
#
print('install_wrong:', w)
#
w = w + 1
time
.
sleep
(
10
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# allEvent().formevent(i, ip, appkey)
except
Exception
:
print
(
'install_wrong:'
,
w
)
w
=
w
+
1
# time.sleep(3)
# try:
# allEvent().adshow(i, ip, appkey,adid)
...
...
@@ -146,12 +147,12 @@ for _ in range(1):
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('登录_wrong:', w)
time
.
sleep
(
10
)
try
:
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
except
Exception
as
err
:
print
(
err
)
print
(
'自定义_wrong:'
,
w
)
#
time.sleep(10)
#
try:
#
allEvent().ziding_event(i, ip, appkey, event)
#
except Exception as err:
#
print(err)
#
print('自定义_wrong:', w)
#
# time.sleep(10)
# try:
...
...
ios_event/ios_script.py
View file @
e2b61a62
...
...
@@ -8,6 +8,7 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
# URL = 'http://10.2.20.42:8080/receive/tkio/'
# URL = 'http://52.81.116.128:18081/receive/tkio/'
URL
=
'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
...
...
@@ -71,7 +72,7 @@ class allEvent:
# 45F38BD4-64DA-485E-BAFD-D1ECEBBCAF18
"_idfa"
:
i
,
# "_oaid":'45F568D4-68DA-875E-BAFD-D3ECEBBCAU56',
# "_idfv": i
,
"_idfv"
:
'64F5A794-A942-4209-81B0-D28FD01E9287'
,
"_ip"
:
IP
,
# '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)',
'_manufacturer'
:
manufacturer
,
...
...
@@ -91,50 +92,50 @@ class allEvent:
# 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 4.download + deviceId无归因结果asa_install_type = new_download对应2
# # 转化类型,新增或重装,Download 或 Redownload
"iad-conversion-type"
:
"Download"
,
# 广告活动组ID(campaign group id)
"iad-org-id"
:
"123456789"
,
# 广告活动组名称(campaign group name)
"iad-org-name"
:
"name"
,
# 广告活动ID
"iad-campaign-id"
:
"111"
,
# 广告活动名称
"iad-campaign-name"
:
"CampaignName"
,
# 广告组ID
"iad-adgroup-id"
:
"111111"
,
# 广告组名称
"iad-adgroup-name"
:
"AdGroupName"
,
# 关键词 id
"iad-keyword-id"
:
"111"
,
# 关键词
"iad-keyword"
:
"Keyword"
,
# 素材ID
"iad-creativeset-id"
:
"111"
,
# 素材名称
"iad-creativeset-name"
:
"CreativeSetName"
,
# 点击ASA广告时间
"iad-click-date"
:
'2021-06-24T11:32:33Z'
,
# 本次下载完成的时间(仅ASA转化时,该值传且必传)
"iad-conversion-date"
:
when
,
# Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# 关键词匹配类型
"iad-keyword-matchtype"
:
"SearchMatch"
,
#首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
"iad-purchase-date"
:
'2021-06-24T11:32:33Z'
,
# 归因结果
"iad-attribution"
:
"true"
,
# 国家
"iad-country-or-region"
:
"US"
,
#
"iad-conversion-type": "Download",
#
#
#
广告活动组ID(campaign group id)
#
"iad-org-id": "123456789",
#
#
广告活动组名称(campaign group name)
#
"iad-org-name": "name",
#
#
#
广告活动ID
#
"iad-campaign-id": "111",
#
#
广告活动名称
#
"iad-campaign-name": "CampaignName",
#
#
#
#
广告组ID
#
"iad-adgroup-id": "111111",
#
#
广告组名称
#
"iad-adgroup-name": "AdGroupName",
#
#
#
#
关键词 id
#
"iad-keyword-id": "111",
#
#
关键词
#
"iad-keyword": "Keyword",
#
#
#
#
素材ID
#
"iad-creativeset-id": "111",
#
#
素材名称
#
"iad-creativeset-name": "CreativeSetName",
#
#
#
点击ASA广告时间
#
"iad-click-date": '2021-06-24T11:32:33Z',
#
#
本次下载完成的时间(仅ASA转化时,该值传且必传)
#
"iad-conversion-date": when,
#
#
#
Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
#
#
关键词匹配类型
#
"iad-keyword-matchtype": "SearchMatch",
#
#
首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
#
"iad-purchase-date": '2021-06-24T11:32:33Z',
#
#
归因结果
#
"iad-attribution": "true",
#
#
国家
#
"iad-country-or-region": "US",
# 'asa_install_time':'2021-06-24T11:32:33Z',
...
...
ios_event_case/ios_fenlianjie.py
View file @
e2b61a62
...
...
@@ -6,10 +6,10 @@ import string
import
time
#iOS常规渠道激活
appkey
=
'
6012db28b7fbdfcb1e3a847756137f9b
'
appkey
=
'
d7fbbb5410a9b70754c9d1e8f16741b3
'
event
=
'event_1'
for
index
in
range
(
30
):
for
index
in
range
(
1
):
# 随机生成12为数组
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
b
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
...
...
@@ -24,8 +24,8 @@ for index in range(30):
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '61.192.125.69'
#
allEvent().installUpload(i,ip,appkey)
#
allEvent().startupEvent(i, ip, appkey)
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
# time.sleep(10)
# allEvent().loginEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey)
...
...
@@ -33,9 +33,9 @@ for index in range(30):
# time.sleep(1)
# allEvent().payorder(i, ip, appkey)
# time.sleep(3)
num
=
index
+
1
event
=
'event_'
+
str
(
num
)
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
#
num = index + 1
#
event = 'event_' + str(num)
#
allEvent().ziding_event(i, ip, appkey, event)
# print(event)
# allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
...
...
microservices/attributioncase.py
View file @
e2b61a62
...
...
@@ -1026,37 +1026,49 @@ def test_atb45():
i
=
code_nums
(
12
)
redirectandroid
.
parms
[
'callback_url'
]
=
'https://www.baidu.com/?tn=98010089_dg&ch=16/'
redirectandroid
.
parms
[
'oaid'
]
=
i
redirectandroid
.
send_request3
(
"FV73Yra"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveandroid
.
data
[
0
][
'application_info'
][
'appkey'
]
=
'b8e5e389e1223ffa16a5a9420258383d'
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'oaid'
receiveandroid
.
send_request
()
time
.
sleep
(
3
)
receiveandroid
.
data
[
0
][
'application_info'
][
'appkey'
]
=
'b8e5e389e1223ffa16a5a9420258383d'
# receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'oaid'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'startup'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_type'
]
=
'preset'
receiveandroid
.
send_request
()
# time.sleep(3)
# receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
# receiveandroid.data[0]['device_info']['device_id'] = i
# receiveandroid.data[0]['device_info']['oaid'] = i
# receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
# receiveandroid.data[0]["event_info"]['event_name'] = '
register
'
# receiveandroid.data[0]["event_info"]['event_name'] = '
startup
'
# receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
# receiveandroid.send_request()
time
.
sleep
(
3
)
receiveandroid
.
data
[
0
][
'application_info'
][
'appkey'
]
=
'b8e5e389e1223ffa16a5a9420258383d'
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'oaid'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'
purchase
'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'
register
'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_type'
]
=
'preset'
receiveandroid
.
send_request
()
time
.
sleep
(
3
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'oaid'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'login'
receiveandroid
.
data
[
0
][
"event_info"
][
'event_type'
]
=
'preset'
receiveandroid
.
send_request
()
# time.sleep(3)
# receiveandroid.data[0]['device_info']['device_id'] = i
# receiveandroid.data[0]['device_info']['oaid'] = i
# receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
# receiveandroid.data[0]["event_info"]['event_name'] = 'purchase'
# receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
# receiveandroid.send_request()
# time.sleep(3)
# receiveandroid.data[0]['device_info']['device_id'] = i
# receiveandroid.data[0]['device_info']['oaid'] = i
# receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
# receiveandroid.data[0]["event_info"]['event_name'] = 'order'
# receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
# receiveandroid.send_request()
# time.sleep(3)
# receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
# receiveandroid.data[0]['device_info']['device_id'] = i
...
...
microservices/attributioncaseios.py
View file @
e2b61a62
...
...
@@ -1207,7 +1207,7 @@ def test_atb44():
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
time
.
sleep
(
5
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
...
...
microservices/channelcallback.py
0 → 100644
View file @
e2b61a62
import
json
import
pytest
import
requests
url
=
"http://10.2.20.41:8099/tkio2/openapi/v1/channel_callback/"
cookie
=
'ry-token=InTqr6Hwz1u6MGZl1WpdL6cR8KgL3sfj'
headers
=
{
'Content-Type'
:
'application/json'
,
'Cookie'
:
cookie
}
def
test_add
():
data
=
{
"appkey"
:
"678ca51be65b91dfdd86293af9cfbe31"
,
"cid"
:
17797
,
"callback_name"
:
"腾讯广告-install"
,
"callback_template"
:
"install"
,
"event_name"
:
"install"
,
"attribution_type"
:
"ua"
,
"touchpoint_type"
:
"click"
}
send_request
(
'add'
,
data
)
def
send_request
(
sub_url
,
data
):
response
=
requests
.
request
(
"POST"
,
url
+
sub_url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
print
(
response
.
text
)
if
__name__
==
'__main__'
:
pytest
.
main
()
microservices/receiveandroid.py
View file @
e2b61a62
This diff is collapsed.
Click to expand it.
microservices/receiveios.py
View file @
e2b61a62
...
...
@@ -16,7 +16,7 @@ data = [
{
"application_info"
:
{
# 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-
678ca51be65b91dfdd86293af9cfbe31
# 测试-
55705dbd45dd246751b87bba94b8c73c
"appkey"
:
"55705dbd45dd246751b87bba94b8c73c"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
...
...
microservices/redirectandroid.py
View file @
e2b61a62
...
...
@@ -127,7 +127,10 @@ def send_request2():
# 测试归因用的方法,与其他方法区别在于ts为当前时间
def
send_request3
(
cs
):
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/fQvuUba'
+
cs
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/B73uQja' + cs
# 线上
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/vMvqE3a'
+
cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
...
...
@@ -143,6 +146,8 @@ def send_request3(cs):
def
send_request4
():
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/zMFjQva'
# url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/vMvqE3a'
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
print
(
response
.
text
)
...
...
microservices/redirectios.py
View file @
e2b61a62
...
...
@@ -86,7 +86,9 @@ data_temp = json.dumps(parms)
# print(p.content)
def
send_request
(
cs
):
global
parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/aimmeya' + cs
# 线上
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia'
+
cs
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
...
...
@@ -99,7 +101,9 @@ def send_request(cs):
def
send_request3
(
cs
):
global
parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/VVvEz2a' + cs
# 线上
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia'
+
cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment