Create a test page for ad tags

Before deploying new ad tags to a live website, you should place them on a test page to check their functionality. Creating a test page before deployment allows you to isolate the tags and confirm that they have been implemented properly independent of the other elements of your website.

The following instructions outline the process of creating a test page. Since the actual steps may vary depending on your particular environment, please reach out to your web developer or IT team if you have questions about how to complete this process at your organisation.

To create a test page:

  1. Open a plain-text editor (such as Notepad or TextWrangler) and place the following code in a blank file:

    <html>

    <head>
    </head>

    <body>
    </body>

    </html>
  2. On the 'Inventory' tab in DFP, select the ad unit you'd like to test.

  3. Click Generate tags.

  4. In the 'Tag type' drop-down, choose the type of tag that you want to generate.

  5. Copy and paste the Google Publisher Tag into the code for your test page: Paste the code from the 'Header' section between the <head> and </head> tags. Paste the code from the 'Document body' section between the <body> and </body> tags. See GPT tag examples.

  6. Manually add customised targeting key-values to the tag, if applicable.

  7. Save the code as an HTML file.

  8. Upload the HTML file to the web server that hosts your web content. This step is largely dependent on your web host configuration, so your web developer or IT team should be able to help you if you have questions about how to complete it. Alternatively, if you cannot upload the page to a web server, you can save it locally.

  9. Visit the URL (or file location) for your test page and ensure that the ad tag functions properly using multiple web browsers (for example, Chrome, Firefox, Safari and Internet Explorer) and operating systems.

You can also paste the creative code directly into a test page (between <body> and </body>). This will help you to see whether an issue is related to the creative, e.g. the creative is not working in general or whether the creative is just not displaying when trafficked through DFP Small Business.