广告跟踪
方舟5.4.1版本中新增API。

1. 创建广告跟踪

创建一个广告跟踪。

1.1 接口地址

【POST】 /ark/uba/api/operations/utm

1.2 请求参数示例

1
// 【非必填】通过urlPath传参, username是创建人的用户名
2
loginUser=?
3
// body 中传参
4
{
5
// 【必填】目标网址
6
"pageUrl": "http://www.baidu.com",
7
// 【必填】广告名称
8
"utmCampaign": "xx平台广告",
9
// 【必填】广告媒介
10
"utmMedium": "品牌搜索",
11
// 【必填】广告来源
12
"utmSource": "微博",
13
// 广告内容
14
"utmContent": "点击领取优惠券",
15
// 广告关键字
16
"utmTerm": "优惠券",
17
// 备注
18
"remarks": ""
19
}
Copied!
认证参数:接口必传token和appKey两个参数,详情见 项目接口认证

1.3 返回结果示例

1
{
2
"success":0,
3
// 广告跟踪唯一标识
4
"campaignId": 124343232
5
}
Copied!

1.4 接口调用示例

1
curl -H "Content-Type:application/json" -H "token:4113c9cad1c301113783f433e254888c" -H "appKey:31abd9593e9983ec" -X POST --data '{
2
"utmType": "H5",
3
"pageUrl": "http://www.baidu.com",
4
"utmCampaign": "xx平台广告",
5
"utmMedium": "品牌搜索",
6
"utmSource": "微博",
7
"utmContent": "点击领取优惠券",
8
"utmTerm": "优惠券",
9
"remarks": ""
10
}' http://127.0.0.1:4005/ark/uba/api/operations/utm?username=admin
Copied!

2. 获取广告跟踪

获取广告跟踪信息, 包括长短链

2.1 接口地址

【GET】 /ark/uba/api/operations/utm/{campaignId}

2.2 请求参数示例

1
//【必填】广告跟踪唯一标识 url路径参数
2
/ark/uba/api/operations/utm/124343232
Copied!
认证参数:接口必传token和appKey两个参数,详情见 项目接口认证

2.3 返回结果示例

1
{
2
"id": 4,
3
"campaignId": "1591933676",
4
"utmType": "eee",
5
"callbackUrl": null,
6
"pageUrl": "www.as.com",
7
"utmCampaign": "",
8
"utmMedium": "xcczx",
9
"utmSource": "ew",
10
"utmContent": "fdf",
11
"utmTerm": "fvdfv",
12
"checkUrl": null,
13
"checkShort": null,
14
"checkQrcode": null,
15
"url": "www.as.com?campaign_id=1591933676&utm_campaign=&utm_medium=xcczx&utm_source=ew&utm_content=fdf&utm_term=fvdfv",
16
"shortUrl": "utmJNOubA",
17
"qrcode": null,
18
"remarks": "s",
19
"appKey": "apitestauto",
20
"userId": -99,
21
"status": 1,
22
"createTime": 1618458179000,
23
"updateTime": 1618486625000,
24
"canOperated": 0,
25
"createName": null,
26
"loginName": null,
27
"email": null,
28
"phone": null,
29
"uniqueSign": "1591933676",
30
"batchNum": null,
31
"project": null,
32
"originUrl": null
33
}
Copied!

2.4 接口调用示例

1
curl -H "Content-Type:application/json" -H "token:4113c9cad1c301113783f433e254888c" -H "appKey:31abd9593e9983ec" -X GET http://127.0.0.1:4005/ark/uba/api/operations/utm/124343232
Copied!

3 查看转化效果‌

查询该广告跟踪的转化效果

3.1 接口地址

【POST】 /ark/uba/api/operations/utm/analysys/{campaignId}

3.2 请求参数示例

1
{
2
// 【必填】查询起始日期
3
"fromDate": "2021-04-03",
4
// 【必填】查询结束日期
5
"toDate": "2021-04-12",
6
"useCache": true,
7
// 转化目标
8
"expression":"event.login"
9
10
}
Copied!
认证参数:接口必传token和appKey两个参数,详情见 项目接口认证

3.3 返回结果示例

1
{
2
"success":0
3
}
Copied!

3.4 接口调用示例

1
curl -H "Content-Type:application/json" -H "token:4113c9cad1c301113783f433e254888c" -H "appKey:31abd9593e9983ec" -X POST --data '{
2
"convertMeasures":[
3
{
4
"expression":"event.login",
5
"aggregator":"TRIGGER_USER_COUNT"
6
}
7
],
8
"fromDate": "2021-04-03",
9
"toDate": "2021-04-12",
10
"useCache": true
11
}' http://127.0.0.1:4005/ark/uba/api/operations/utm/analysys/124343232
Copied!

4. 删除广告跟踪‌

逻辑删除广告跟踪数据

4.1 接口地址

【DELETE】 /ark/uba/api/operations/utm/drop/{campaignId}

4.2 请求参数示例

1
//【必填】广告跟踪唯一标识 url路径参数
2
/ark/uba/api/operations/utm/drop/124343232
Copied!
认证参数:接口必传token和appKey两个参数,详情见 项目接口认证

4.3 返回结果示例

1
{
2
"success":0
3
}
Copied!

4.4 接口调用示例

1
curl -H "token:4113c9cad1c301113783f433e254888c" -H "appKey:31abd9593e9983ec" -X DELETE http://127.0.0.1:4005/ark/uba/api/operations/utm/drop/124343232
Copied!
最近更新 8mo ago