实现目标转化

Goal Fulfillment 实现目标转化

Goals 接口允许标记达到(实现)特定业务转化目标的收件人,如”making a purchase”(已购买)或 “filling the questionnaire”(填写了问卷).
如果你希望使用转化追踪功能,这个接口会很有用,但是由于某些原因不能使用自动追踪cookie(如,部分业务流程在你的网站外实现).
关于转化目标功能的更多信息,请联系我们的团队.
HTTP POST方式将被用于发送此请求.

请求数据格式

Data 子元素:
元素/属性 类型 描述
GoalId integer 转化目标标识ID. 必填.
GoalValue integer 已达到的转化目标值. 这可能是价格, 点数等. 如果希望用非整数值, 请先行转换 (取整, 乘以100等). 默认值为0,选填.
MessageGuid guid (string) 所发送单封邮件的标识ID. MessageGuid 可以清晰分辨收件人, 邮件, 列表等 .

此值源于 ExpertSender 系统,产生于发送邮件过程中. 你可以在邮件中利用 *[message_guid]*标签,这样,通过将邮件中的链接打上此个性化标签即可将它传递到你的网站,必填.

Channel string 被用来发送给单一收件人的通道. 选填. 可用的取值为: All 全部, Email 电邮, SmsMms 短信/彩信.

示例

请求:

POST https://api.esv2.com/v2/Api/Goals HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Content-Length: 298
Host: api.esv2.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
<ApiRequest xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xs=”http://www.w3.org/2001/XMLSchema”>
  <ApiKey>test_api_key1</ApiKey>
  <Data>
    <GoalId>2</GoalId>
    <GoalValue>123</GoalValue>
    <MessageGuid>C7015756-95F3-4509-8C6C-759FEEC48F91</MessageGuid>
  </Data>
</ApiRequest>
OK 应答:
HTTP/1.1 201 Created
Cache-Control: private
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 17 Apr 2013 11:27:02 GMT
Content-Length: 0
错误应答 (错误的 UID 别传递):
HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 24 Apr 2013 11:14:46 GMT
Content-Length: 239<ApiResponse
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>

 <ErrorMessage>
  <Code>400</Code>
  <Message>Message GUID was not recognized.</Message>
 </ErrorMessage>
</ApiResponse>