Hi ! h_title
Support
Home
Developers
REST API
REST API

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 {
        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);
    }
}



Has reading the relevant articles not helped you?

Share article

Link copied to clipboard

Cookies

We are using cookies.

Want to know more? Take a look at our cookie statement.

The Livechat uses trackingcookies, do you accept these cookies?

Accept