1 回答
TA贡献1812条经验 获得超5个赞
我想到了。
Tracker类包含trackUnstructuredEvent:
/**
* Tracks an unstructured event with the aforementioned metrics
*
* @param array $event_json - The properties of the event. Has two fields:
* - A "data" field containing the event properties and
* - A "schema" field identifying the schema against which the data is validated
* @param array|null $context - Event Context
* @param int|null $tstamp - Event Timestamp
*/
public function trackUnstructEvent($event_json, $context = NULL, $tstamp = NULL) {
$envelope = array("schema" => self::UNSTRUCT_EVENT_SCHEMA, "data" => $event_json);
$ep = new Payload($tstamp);
$ep->add("e", "ue");
$ep->addJson($envelope, $this->encode_base64, "ue_px", "ue_pr");
$this->track($ep, $context);
}
接受模式作为输入。Snowplow希望您使用Tracker的默认功能,并提供以上内容作为我的问题的解决方案。
但是它仍然有一个环绕数据的模式(包含输入模式)。
- 1 回答
- 0 关注
- 125 浏览
添加回答
举报