export class PageViewContext {
public productDetail(instanceKey: string, data: { profileKey: string, productKey: string }): any {
request(options.endpoint + '/api/pageview/', [{ key: 'Instance-Key', value: instanceKey }], data);
}
}
export class FacetClickContext {
public post(instanceKey: string, data: { facet: string, value: string, context: { filterTemplateId?: number, categoryPath: string, page: string, domain: string } }) {
request(options.endpoint + '/api/events/facetclick/', [{ key: 'Instance-Key', value: instanceKey }], data);
}
}
export class PurchaseContext {
public post(instanceKey: string, data: { profileKey: string, productKeys: string[] }) {
request(options.endpoint + '/api/purchase/', [{ key: 'Instance-Key', value: instanceKey }], data);
}
}
export class SearchContext {
public post(instanceKey: string, data: { profileKey: string, searchTerm: string }) {
request(options.endpoint + '/api/search/', [{ key: 'Instance-Key', value: instanceKey }], data);
}
}Implementing Server Side Tracking for hyper-personalization using the Tweakwise Analytics API
export class PageViewContext { public productDetail(instanceKey: string, data: { profileKey: string, productKey: string }): any { ...
Updated this week