Integration Workflow
Learn what steps should be followed to make Onsite integration process smooth and quick.
Martailer is always integrated via backend. Same integration principles apply regardless of you your frontends: web, mobile app.

Integration diagram for Onsite use case.
Integration Process
- Create a store(s) using /stores endpoint. Sores contextualise product catalog i.e. same SKU could be available in one store and out of stock in another.
- Provide Martailer access to your product catalog via /sync/products endpoint.
- (Optional) Upload order history. It is used to build ad-targeting models.
- Martailer ingests product catalog, and order history (if provided).
- Create some test campaigns using Martailer's campaign manager.
- On every page load make a PUT request to /log/events endpoint to report a pageview event. Events are used to build visitor profiles and serve them personalized ads.
- Make a POST request to /combined/ads endpoint, providing necessary parameters such as `placement`, `visitorId`, 'numberOfAds'.
- Martailer returns a set of ads in the JSON list format. Single response may contain multiple ads and multiple ad formats e.g. both sponsored products and banners.
- Your backend blends received ads with your content.
- Your backend sends combined information to your frontend.
- When ads are loaded into the visible part of the visitor's screen, you should report the impression event of one or multiple ads to Martailer by making a PUT request to /log/events endpoint providing parameters such as `event`, `visitorId`, `customerId' and a list of `adId`s for which you are reporting an impression.
- When ad is clicked by your visitor, you report the click by making a PUT request to /log/events endpoint providing parameters such as `visitorId`, `customerId' and an `adId` of an ad for which you are reporting a click.
- When order(s) occur, make sure to upload them by making POST request to /log/orders endpoint. Please note orders may be reported either in batches or one order at a time.
Updated 3 months ago