Skip to main content

How do I add the Publisher snippet to my website?

Create an ad slot in the Publisher app, copy its snippet and paste it into your page’s HTML where the ad should appear. In WordPress, use a Custom HTML block.

  • In the Publisher app, open your approved website and choose to create an ad slot. Pick its place (banner, sidebar or in-content) and its size: a standard size or responsive.
  • Copy the snippet the app shows for that slot. It is shown only after your website is approved.
  • Paste it into your page where the ad should appear, then publish the page and open it in a new browser window to check.

The snippet has two parts: a script line that loads Housing Market once per page, however many slots the page has, and a short placeholder line that marks where one slot appears. The script line looks like this: <script async src="..."></script>. Copy the real snippet from the app rather than typing it.

  • Plain HTML: paste the placeholder line into the page where the ad should appear, and the script line once in the same page, for example just before the closing body tag.
  • WordPress: edit the page or post, add a Custom HTML block where the ad should appear and paste the snippet into it. For every page of your website at once, put the script line in your theme’s footer or header area or in a header and footer plugin, and the placeholder lines where each slot should appear.
  • Another website builder: use its embed or custom code element and paste the snippet in the same way.

If a slot shows nothing, see the answer in this section about an empty slot. Remember to show your visitors a consent banner as well.

Still need help?

If this did not answer your question, get in touch and we will help.

Contact support