Website In-Page Campaign API

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.

Path Params
string
required

Unique identifier for your site.

string
required

URL path parameter. Indicates the type of identifier used to identify the person. Currently-supported identifier types are email, user_id, and bsin. A person's bsin can be obtained through the route documented at Get a Boomtrain Identifier for a Person

string
required

URL path parameter. Indicates the identifier for the person receiving recommendations.

Query Params
string
required

Identifies the Placement name. It can be picked as is from the Website In Page Campaign UI without the need of removing spaces

boolean
Defaults to false

URL query parameter. If true then don't record recommendations. Accepts any of t, true, y, yes, or 1 as true, all other values are treated as false. Note that this value should NOT be set unless you are testing recommendations pre-deployment.

Responses

Language
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json