get https://onsiterecs.api.boomtrain.com/api/v:version/osrs///
The Website In-Page Campaign API returns resources for a specified user based on the configured Placement logic.
Request
curl 'https://onsiterecs.api.boomtrain.com/api/v1/osrs/your_site/email/[email protected]?pname=your_placement_name&test=true'
curl 'https://onsiterecs.api.boomtrain.com/api/v1/osrs/your_site/bsin/Lhzn0ClM1A397PINUa%2BzVSoh%2BH06noQl%2F9wNxvKWLa8jEsNFj58yKhA6bOoeDNG2S6TYsmkkj6u7xDdcOcp1tA%3D%3D?pname=your_placement_name&test=true'
Please note:
When you're ready to deploy this endpoint, remove 'test=true' from the URL. Otherwise, user metrics will not be recorded.
Results
[
{
"selector": "",
"placement": "replace",
"view-pixel-url": "https://redirect.api.boomtrain.com/vp/site/MPYIlJ5wVbiAk/WKDz+eTt7tPvJn8diIBkjyf0PO9vEUSI155pgjju+XgdHpH0S8sVcrTntNZ2A1954wgyZ80A==?c=None&b=None&p=True&rt=None&rid=None&r=None&rsid=ae3ace96-e701-11e5-9ddd-12d5480515d7",
"recs": {
"sections": {
"recs": {
"recs": [
{
"campaign_name": "Single Website Campaign",
"click-url": "https://redirect.api.boomtrain.com/click/application/abc?r=article:1234&c=None&b=None&rd=http://example.com",
"id": "39",
"is_personalized": false,
"props": {
"campaign_name": "Managing Your Money & Lifestyle",
"content": "carousel",
"description": "Cut down on holiday costs this year with these 7 shopping secrets. You don't have to skimp on your best holiday gift ideas with these quick shopping tips.",
"device": "Desktop, Mobile",
"experience": "Default",
"expiration_date": "2021-11-04T09:19:09.860000+00:00",
"pubDate": "2021-11-04T09:19:09.860000+00:00",
"resource-id": "39",
"scenario_name": [
"Unknown"
],
"thumbnail": "http://images.boomtrain.com/nPxlsbnUidapRiOPVDYew7h3gk1qo7m95OPmYdPe67Y.png",
"title": "7 Secrets to Shopping Smarter: Ways to Save Money on Holiday Gift Ideas",
"url": "http://example.com"
},
"rec-id": "264f5c00-6eb5-4a35-9cdd-dd828d412c49:Single Website Campaign!recs!user_interest:0",
"recset-id": "264f5c00-6eb5-4a35-9cdd-dd828d412c49",
"resource-type": "article",
"thumbnail": "http://images.boomtrain.com/nPxlsbnUidapRiOPVDYew7h3gk1qo7m95OPmYdPe67Y.png"
},
{
"campaign_name": "Single Website Campaign",
"click-url": "https://redirect.api.boomtrain.com/click/application/abc?r=article:0229&c=None&b=None&rd=http://example.com/2",
"id": "86",
"is_personalized": false,
"props": {
"campaign_name": "Market Outlook",
"content": "carousel",
"description": "The path to the U.S. presidency is a long and arduous one. With the U.S. election on November 3rd quickly approaching, uncertainty remains elevated.",
"device": "Desktop, Mobile",
"experience": "Default",
"expiration_date": "2021-11-04T09:22:20.255000+00:00",
"pubDate": "2021-11-04T09:22:20.255000+00:00",
"resource-id": "86",
"scenario_name": [
"Unknown"
],
"thumbnail": "http://images.boomtrain.com/EvA0Q1EjAgyK78AwUhzNqdq0WIt0oSXx6smKGv4hgc0.gif",
"title": "Washington Watch: The Path to the Presidency",
"url": "http://example.com/2"
},
"rec-id": "264f5c00-6eb5-4a35-9cdd-dd828d412c49:Single Website Campaign!recs!user_interest:1",
"recset-id": "264f5c00-6eb5-4a35-9cdd-dd828d412c49",
"resource-type": "article",
"thumbnail": "http://images.boomtrain.com/EvA0Q1EjAgyK78AwUhzNqdq0WIt0oSXx6smKGv4hgc0.gif"
},
"request_context": "user_interest",
"type": "popular"
}
},
"view-pixel": "https://redirect.api.boomtrain.com/vp/site/MPYIlJ5wVbiAk/WKDz+eTt7tPvJn8diIBkjyf0PO9vEUSI155pgjju+XgdHpH0S8sVcrTntNZ2A1954wgyZ80A==?c=None&b=None&p=True&rt=None&rid=None&r=None&rsid=ae3ace96-e701-11e5-9ddd-12d5480515d7"
}
}
]
View Pixel Tracking
In order to provide metrics and data to improve Boomtrain's recommendation systems, the `view-pixel` returned in the result of this call should be impressed whenever these results are viewed by a user. This can be done by adding an invisible image pixel into the HTML body where the request is being shown. For example, <img src="view-pixel returned by this route" />.Results
Note that the view-pixel
should be rendered on each impression of a recommendation set in order to track views of recommendations.
As well, the click-url
should be triggered upon click of any recommendation in order to track clicks for the purpose of evaluating performance.