Introduction

So you just received your tags from publift? How do you put them on your site? See below:

The Fuse Tag consists of two main parts.

1. The Header Script

<script async src="//cdn.publift.com/fuse/tag/2/999/fuse.js"></script>

2. The Body Script

 <div data-fuse="21685397755"></div>

Implementation

The Header Script can go anywhere on the page, however we recommend to place it in the HTML <head> just before the closing </head> tag for optimal serving.

The Body Script needs to be placed within the HTML <body> in the exact location the ad is supposed to display. Do not place any other HTML code within the Fuse body unit.


Now that you understand the structure of the Fuse Tags we will run through an exmaple of how to implement this. To follow along, you can copy the below HTML code and insert the fuse tags you were sent.

Example

To start of we will start of the implementation process we will need a simple HTML page:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>


Click download above if you'd like to start of with a blank HTML page



Open the HTML code in your favourite text editor.

Locate the <head> of the page.

In our example page the head looks like this:

<head>
<title>Page Title</title>
</head>

We now need to modify the <head> to include the header script which will make the adcalls.

Copy your header script which you would of received from Publift and paste it at the very end of your header. Just above the </head> tag.

Your code should now look like this:

  • Note the variables in the script src will vary.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script async src="//cdn.publift.com/fuse/tag/2/999/fuse.js"></script>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

The next step is to add in the body script.

This piece of code is used to display the ad. The placement of this code is very important, as it determines where the ad will show.

Identify in your code where you would like the ad to be displayed. In this example we will place the ad in between the Heading and the first paragraph.

Get the body script for the adunit you wish to place. We will uset he ad unit called "test_mrec"

Your body script will look very similar to the below:

<--71161633/PL_publift/test_mrec-->
<div data-fuse="21689884288"></div>

Now paste the body script in the HTML

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script async src="//cdn.publift.com/fuse/tag/2/999/fuse.js"></script>
</head>
<body>

<h1>This is a Heading</h1>
<--71161633/PL_publift/test_mrec-->
<div data-fuse="21689884288"></div>
<p>This is a paragraph.</p>

</body>
</html>

Upload the file to your Webserver and youre Done!