Set up AreaLens on your site

Add AreaLens to your property pages in a few minutes. One snippet covers every listing.

  1. Find the postcode field or property template where you want the widget to appear.
  2. Paste the snippet below. The widget reads each listing's postcode from the page automatically. If it can't on your site, use one of the options further down.
  3. That's it: no build step, no dependencies to install.

Paste this once into your property page template, where you want AreaLens to appear. It picks up each listing's postcode from the page automatically.

<div id="arealens-root" data-agent="al_your_id"></div>
<script src="https://area-lens.co.uk/embed.js"></script>

Request access to get your own agent ID. The snippet above is just an example until then.

If your site uses one template for every listing

Most agency sites don't have a separate page per property. They have one template (in your CMS, CRM website builder, or theme) that every listing is rendered through. That's actually the easier case: you only ever edit the snippet once, in the template itself, and every existing and future listing picks up the right postcode automatically.

The part that changes per platform is only the postcode. Everywhere you see data-postcode="YO32 3HT" below, replace it with whatever your platform's own syntax is for "this property's postcode", which your web developer or CMS/CRM support team can confirm in a couple of minutes.

WordPress

If your postcode is a custom field (ACF, Pods, or similar):

<div id="arealens-root" data-agent="al_your_id" data-postcode="<?php echo esc_attr( get_field('postcode') ); ?>"></div>
<script src="https://area-lens.co.uk/embed.js"></script>

The exact field name (postcode above) depends on how your theme or plugin stores it. Check under Custom Fields on a property's edit screen.

A CRM-fed website (Reapit, Dezrez, Jupix, Alto, Vebra, etc.)

These platforms already merge property data into your template using their own placeholder syntax, for example:

<div id="arealens-root" data-agent="al_your_id" data-postcode="[PROPERTY_POSTCODE]"></div>
<script src="https://area-lens.co.uk/embed.js"></script>

Ask your CRM's website support team for "the merge field or template tag for the property's postcode". They'll know the exact syntax (often something like [POSTCODE], {postcode}, or %%postcode%%) for your specific theme.

Squarespace or Wix

These builders don't support per-listing dynamic fields the same way. Add the snippet via a Code Block on each property page, with that property's real postcode typed in directly.

One thing worth doing once your template is wired up: if your site pulls every listing from one shared template, adding the snippet there means all your existing live listings get the widget at once, not just new ones going forward. Head to Properties and use "Add Properties" to prepare all of them in the background, so the first buyer on each listing doesn't wait for it to build fresh.

No postcode field available at all?

Some platforms geocode each property (to show a Google map, for example) but don't expose the postcode itself as a template field your developer can use. If that's your situation, the widget can work out the postcode itself, in two ways, without needing a postcode field to exist anywhere in your template.

Try it with nothing configured first

Before doing anything below, just paste the two-line snippet as-is, with no data-postcode needed:

<div id="arealens-root" data-agent="al_your_id"></div>
<script src="https://area-lens.co.uk/embed.js"></script>

If nothing else is set, the widget checks the page's own <title> and its main heading for a postcode. Nearly every property portal template already prints the full address in one of those two places, so this often just works with zero setup. Only move on to the options below if it doesn't.

Your template already has coordinates

If your property page shows a map (most do), your template already has the latitude and longitude available, reuse those same two values here instead of the postcode, and the widget looks up the postcode itself:

<div id="arealens-root" data-agent="al_your_id" data-lat="51.3864" data-lng="1.3691"></div>
<script src="https://area-lens.co.uk/embed.js"></script>

Replace 51.3864 and 1.3691 with whatever template variables your platform already uses for the map, for example the same ones feeding a maps.google.com/maps?q=lat,lng embed.

The postcode is printed elsewhere on the page

If the full postcode already appears somewhere on the property page, even if there's no clean template variable for it, point the widget at that element instead, using any CSS selector (an id, a class, anything that uniquely identifies it):

<div id="arealens-root" data-agent="al_your_id" data-postcode-selector="#property-address"></div>
<script src="https://area-lens.co.uk/embed.js"></script>

The widget reads that element's text and pulls out the postcode automatically. It only matches a genuine full postcode (e.g. YO32 3HT), so it won't be fooled by a partial one like "CT9" on its own. If the postcode instead sits in an attribute rather than the visible text (a hidden field's value, say), add data-postcode-attribute="value" to read that attribute instead.

Only ever need one of these on this page. data-postcode is simplest when available, auto-detect often just works without it, and the other two exist for sites where neither applies.

Help search engines and AI assistants read your listings

The widget already adds structured data about the area to every listing, which Google reads. Most AI assistants (ChatGPT, Perplexity and others) don't run the widget, though, so they only see what's in the page itself. These options add a short written area summary straight into your page, using the area around the listing's postcode district (never the full postcode).

WordPress: use the AreaLens plugin

Download the plugin, then in WordPress go to Plugins > Add New > Upload Plugin. Under Settings > AreaLens, enter your agent ID (al_your_id) and the name of your postcode field. Then put this in your property template instead of the snippet above:

[arealens]

Shows the widget with the written summary under it. Use [arealens summary="no"] for the widget only.

Any other website: fetch the summary on your server

Your web developer or CRM website team adds one server-side request to the property template, wherever the summary should appear:

https://area-lens.co.uk/api/seo/al_your_id/[PROPERTY_POSTCODE]

It returns ready-made HTML (the summary plus the structured data), so they only need to print it into the page. Add ?part=jsonld for the structured data on its own. It's cached for 6 hours, and it doesn't count as a widget view.

Widget not appearing at all?

Check for a Content-Security-Policy

Some agency sites (usually larger chains, or sites run by a marketing agency that locks down third-party scripts) set a Content-Security-Policy header that only allows scripts from an explicit allowlist of domains. If that's the case here, the embed snippet will silently fail to load, and opening the browser's DevTools (F12) → Console tab will show an error that looks like this:

Loading the script '.../embed.js' violates the following Content
Security Policy directive: "script-src 'self' *.example.com ..."

If you see that, ask whoever manages your website's hosting or CSP configuration to add the AreaLens script domain to the script-src directive. This is a one-line change on their end, the same thing they'd have done for any other embedded widget (a chat tool, an analytics script), and doesn't require re-adding the snippet once it's allowlisted.