If you work with HTML, you may have come across DoubleClick tags before. For those who don’t know, DoubleClick Floodlight is one method used by advertisers to track traffic on a web page, either through page views or clicks on a certain button. If you’ve tried to implement Floodlight tags before, you may know just how difficult they can be. This guide is to help aid the process of placing these tags correctly in your code!

I will provide two examples of DoubleClick Floodlight tags including a tag called to track visits to a single page and tags to track clicks on a button leading to an external page. I will also provide a method to test that these tags are functioning properly after they are implemented.

To track visits to a SINGLE PAGE, insert the following code in-between the <body> and </body> tags, as close to the opening tag as possible. Be sure to change all information to match your own tags. This information can be found on advertisers.doubleclick.net after you’ve set up an account.

To track BUTTON CLICKS leading to outside websites, go to the DoubleClick site linked below where you will see three methods to track button clicks: 1. Floodlight is called when the click opens a new window (“callFloodlight_new”), 2. Floodlight is called when the click loads a page in the same window (“callFloodlight_same”), and 3. an Image Floodlight which is only used in certain circumstances (“callStaticFL”).

The HTML and Javascript codes for these solutions can be found on THIS WEBSITE . Simply view the source code in your browser, and copy/paste the correct Javascript and HTML into your project. When copying the “<a href=…>” portion of these codes, be sure to replace the “(‘source’, ‘type’, ‘cat’)” values to match your code provided on advertisers.doubleclick.net.

Note: You will only need to place the Floodlight javascript once in the <head> tags. All links that call that Floodlight function will refer to the same script.

After you’ve set up your codes, you can easily test all of your Floodlight tags by viewing the activity window in your browser ( I personally find it easier to test in Safari). If you are testing the individual page tracker, you should see something along the lines of “http://1234567.fls.doubleclick.net…” appear in the activity window as soon as the page loads. Testing the onClick trackers, you should see a similar string of code appear, but only when the tracked button is clicked. This code will remain in the activity window as long as the main page is open. Clicking twice on the same button should load the same link twice in the activity window.