|
@@ -37,6 +37,7 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
const entity = {
|
|
const entity = {
|
|
appId: this._appId,
|
|
appId: this._appId,
|
|
module: params.module,
|
|
module: params.module,
|
|
|
|
+ type: params.type,
|
|
url: params.url || this._history.playload.url,
|
|
url: params.url || this._history.playload.url,
|
|
eventType: params.eventType,
|
|
eventType: params.eventType,
|
|
referrer: params.referrer || this._history.currentRef,
|
|
referrer: params.referrer || this._history.currentRef,
|
|
@@ -67,6 +68,7 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
const payload: TrackEntityType = {
|
|
const payload: TrackEntityType = {
|
|
module: 'pageview',
|
|
module: 'pageview',
|
|
url: url,
|
|
url: url,
|
|
|
|
+ type: 'pageview',
|
|
eventType: 'pageview',
|
|
eventType: 'pageview',
|
|
language: historyPlayload.language,
|
|
language: historyPlayload.language,
|
|
userId: this._config.user,
|
|
userId: this._config.user,
|
|
@@ -92,6 +94,7 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
const payload: TrackEntityType = {
|
|
const payload: TrackEntityType = {
|
|
module: event_name,
|
|
module: event_name,
|
|
url: url,
|
|
url: url,
|
|
|
|
+ type: 'event',
|
|
eventType: event_data,
|
|
eventType: event_data,
|
|
language: historyPlayload.language,
|
|
language: historyPlayload.language,
|
|
userId: this._config.user,
|
|
userId: this._config.user,
|
|
@@ -110,6 +113,7 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
|
|
|
|
const payload: TrackEntityType = {
|
|
const payload: TrackEntityType = {
|
|
module: trackActionName,
|
|
module: trackActionName,
|
|
|
|
+ type: 'track',
|
|
eventType: trackActionOption.eventType,
|
|
eventType: trackActionOption.eventType,
|
|
requestData: Object.assign({ screen: historyPlayload.screen }, trackObj, this._config),
|
|
requestData: Object.assign({ screen: historyPlayload.screen }, trackObj, this._config),
|
|
language: historyPlayload.language,
|
|
language: historyPlayload.language,
|
|
@@ -130,6 +134,7 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
|
|
|
|
const payload: TrackEntityType = {
|
|
const payload: TrackEntityType = {
|
|
module: trackActionName,
|
|
module: trackActionName,
|
|
|
|
+ type: 'start_track',
|
|
eventType: trackActionOption.eventType,
|
|
eventType: trackActionOption.eventType,
|
|
requestData: Object.assign({}, trackObj, this._config),
|
|
requestData: Object.assign({}, trackObj, this._config),
|
|
language: historyPlayload.language,
|
|
language: historyPlayload.language,
|
|
@@ -141,7 +146,7 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
this.endTrack(trackActionName, trackActionOption);
|
|
this.endTrack(trackActionName, trackActionOption);
|
|
}, trackActionOption.maxWaitTime);
|
|
}, trackActionOption.maxWaitTime);
|
|
}
|
|
}
|
|
- return collect(this.trackUrl, 'startTrack', this.toTrackEntity(payload));
|
|
|
|
|
|
+ return collect(this.trackUrl, 'period_track', this.toTrackEntity(payload));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -155,13 +160,14 @@ export class BaseTrack implements IBaseAction, ICustomAction {
|
|
|
|
|
|
const payload: TrackEntityType = {
|
|
const payload: TrackEntityType = {
|
|
module: trackActionName,
|
|
module: trackActionName,
|
|
|
|
+ type: 'end_track',
|
|
eventType: trackActionOption.eventType,
|
|
eventType: trackActionOption.eventType,
|
|
requestData: Object.assign({}, trackObj, this._config),
|
|
requestData: Object.assign({}, trackObj, this._config),
|
|
language: historyPlayload.language,
|
|
language: historyPlayload.language,
|
|
networkType: trackActionOption.networkType,
|
|
networkType: trackActionOption.networkType,
|
|
userId: this._config.user,
|
|
userId: this._config.user,
|
|
};
|
|
};
|
|
- return collect(this.trackUrl, 'endTrack', this.toTrackEntity(payload));
|
|
|
|
|
|
+ return collect(this.trackUrl, 'period_track', this.toTrackEntity(payload));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|