JSON return tag

The JSON return tag delivers data directly to a first-party page in JSON format. Real-time parsing or targeting can pull data out of the DOM at the time the page is rendered. The user must visit the site to initiate data delivery.

The JSON return tag works as follows:

  1. The user visits the partner's site that has an Oracle Data Cloud JSON return tag.
  2. Oracle Data Cloud servers evaluate the use rfor inclusion in an audience.
  3. The Oracle Data Cloud platform formats user data in JSON format.
  4. The JSON response is returned to the page as a JavaScript object (bk_results) so that it can be evaluated by first-party servers.

Requirements

  • A JavaScript tag (required to service every call)
  • A production side web server capable of retrieving HTTP requests
  • Client-side code capable of retrieving JavaScript objects from the first-party DOM
  • Server- or client-side code capable of parsing JSON objects

In this topic

Deploying the JSON return tag

To deploy the JSON return tag on your site:

  1. Create a container using the container tool in the UI or the containers API and note its site ID.

    Delivery Partners Receiving EU Data. To receive data via the JSON Return Tag for user profiles located in the European Union (EU), you must have signed Oracle's General Data Protection Regulation (GDPR) Right to Use agreement. Contact your Oracle Account Representative to obtain and sign the agreement.

  2. Select the JS tag type in the code generator and then click Copy in the code box.
  3. If you use the containers API, copy and paste the following example and replace the site ID with your container's site ID.

    JS return taghttps://stags.bluekai.com

    /site/your_site_id?ret=js&limit=1

    Sample response data

    var bk_results = {"campaigns":[{"campaign": 45404, "timestamp": 1390523817, "categories": [{"categoryID": 17,"timestamp": 1390520921}]}]}

  4. Paste the JS tag in the <head> element of each web page you plan to optimize as demonstrated in the following example:
    <head>
      //BlueKai JS Tag
      <script type="text/javascript" src="https://stags.bluekai.com/site/15415?ret=js&limit=1"</script>
      //existing_head_code …
    </head>
  5. Create an audience to select the users you want to target.
  6. Configure audience delivery to use the JSON return delivery method.
  7. (Optional) To control the amount of data return to your web page, use the Advanced Settings dialog to set Win on Sites to Win on Selected Containers (Site IDs) and specify the sites you want to return data via the JSON return tag.
  8. Click Save.

JSON return tag results

  • The JSON response is returned to your web page as the JavaScript object bk_results. The bk_results object includes all the campaigns IDs that won the user (unless you configured the Win on Sites setting), and each campaign ID includes the category IDs that caused the user to be won by the campaign. Typically, you add business logic to your web page that customizes the content or ads displayed to the user based on the campaign ID, category IDs, or an audience ID (if you are an audience injection partner).
  • The campaign timestamp in the result represents when the user was last won by the campaign. The category timestamp represents when the users was last classified into the category that qualified them for that campaign.

    JSON return tag:

    https://stags.bluekai.com/site/24328?ret=js&amp;limit=1

    Sample results

    var bk_results = {
    "campaigns":[
    {
    "campaign": 228419,
    "timestamp": 1390523817,
    "categories": [
    {
    "categoryID": 1134438,
    "timestamp": 1390520921}
    ]}]};

    Learn more

    Containers API

    Creating containers