Creating the Mbox

After the Web site is prepared and the mbox.js reference is created, you can create the mbox.

  1. Ensure the Web page contains a reference to mbox.js.

    It is recommended you insert this reference in the file's <head> section.

  2. In the body of the HTML page where you want to insert an mbox, define the beginning and end of the default content with the div tags as shown below.

    If the mbox will only track and not display, insert no content between the default div tags. Immediately follow the default content close </div> tag with the mboxCreate function.

Before After
<head>

</head>
<head>

<script src="http://www.mycompany.com/​myfolder/mbox.js" ​type="text/javascript">​</script>

</head>
<body>

My existing page.Part that I'd like to overlay 
during a campaign or test.

</body>
<body>

My existing page.
<div class="mboxDefault"​>Part that I'd like to overlay during a campaign or test.

<​/div>

<script type="text/javascript">

mboxCreate('sidebar_recommendations',​'entity.categoryId=EN:Guide:1');

</script>

</body>