Can I add the Loqate Tag to my website using Google Tag Manager?

Yes, this is a great way to get the Loqate Tag working on your website quickly and easily. 
If you are unfamiliar with Google Tag Manager, begin by reading About Google Tag Manager. To add the Loqate Tag to your container in Google Tag Manager:

  • Click ‘Add a new tag’
  • Select ‘Custom HTML Tag’
  • Enter Loqate Predict as the Tag name and paste the Loqate Tag code into the HTML field
  • Select ‘Continue’ and then ‘Fire On’ > ‘All pages’ to ensure the Loqate Tag loads on all pages of your website.
  • Click ‘Create Tag’ then ‘Publish’ at the top right corner.

Your Loqate Tag is now installed on your website and you are ready to continue setting up Loqate services, eg: Capture+.

How do I add the Loqate Tag directly to my site? (without a tag manager)

To complete this process, you must have access to your website source code, be comfortable editing HTML (or have a webmaster/developer who can help you), and have a Loqate Predict account and service set up. 

To set up the Loqate Tag:

  • Log into your Loqate Predict account and choose to set up the Capture+ service, after selecting where you will use Capture+, you will be presented with the Loqate Tag code. The tag is in a box, it starts with . Click the ‘copy’ button to copy it to your clipboard.
  • The Loqate Tag code contains your unique account ID, don’t mix up code snippets from different accounts.
  • You might want to paste it into a text document if you’re worried about accidentally losing or changing the snippet from your clipboard.
  • Paste your snippet (unaltered, in its entirety) into every web page. Paste it before the closing tag of your website HTML.
  • If you use templates to dynamically generate pages for your site (like if you use PHP, ASP, or a similar technology), you can paste the tracking code snippet into its own file, then include it in your page header.
Can I set up the Loqate Tag on a website that’s not Live/online?

Yes, you will need to use a program to host the website locally, such as IIS (Windows) or Apache (Mac/Windows). You will need to create a new site in your hosting programme, and then map it to the file or folder containing the pages you want to set the Tag up on. In the site bindings set the port to 80, then run the website, the URL should look something like this: http://localhost/ (this is the URL you will need to enter during our Tag setup process).

How do I add the Loqate Tag to my website?

There are two ways to add the Loqate Tag to your website:

  • add the Loqate Tag to your website using a Tag Manager such as Google Tag Manager
  • add the Loqate Tag directly into the HTML of every page of your website. This is the easiest method, especially if you do not already use a tag manager.
How can I check if the Loqate Tag is on my site?

To check if the Loqate Tag has been successfully added to your website, open your website in a browser and right click to ‘view page source/view source’. With this view of your website code open, search for the text “” (CTRL + F will open a search tool on most browsers); if the text is found then you have the tag.

How do I set up Loqate services in an app or intranet page?

If you’re not setting up the Loqate Tag on a website, you can use the Loqate API to implement our services in any application.

What can I do if the setup process can’t find the Loqate Tag on my site?

Firstly, check that we are looking at the right website - are there any typos in the website address that you entered? Secondly, did you paste the Loqate Tag code in the right place - save and re-upload your webpages to make sure. Finally, it’s possible your website is cached which means we can’t yet retrieve the updated files that contain the Loqate Tag; read ‘What can I do if my website is cached?’ for help with this.

What can I do if my website is cached?

If your website is not showing recent updates you made then it may need its cache cleared. If you host your own site then speak to your technical team for help. If you do not host your own site then you might need to contact the support team at your hosting provider, or inspect your admin tools for an option to clear the site cache. Sometimes the cache will clear automatically after an hour or so, it’s worth checking again later if you have this problem.

Why do I need to add the Loqate Tag to every page of my website?

Adding the Loqate Tag site-wide is the easiest way for you to set up Loqate services. It will allow you to add our new and existing services to any page of your website in future without the need to involve a web developer each time. Sometimes it’s tricky to find the right stage to add the code, so by doing it this way you know for sure our service will work on the pages you need it to.

How can I stop SSL security warnings when I load up the service on a secure page?

All our services are available across https. To prevent these alerts you need to make a small amendment to the request you are sending to us. Simply change the start of the request you make from "http://services.postcodeanywhere..." to "https://services.postcodeanywhere...".

After changing my form layout, the address isn’t populating the fields. Can I reset my address look-up?

Yes. You can control your lookup settings from the service area when you log in to your account, Choose the key you want to edit and select the On Page Setup tab. From here you can Activate the on-page setup which will launch the setup process again, allowing you to reconfigure how the lookup works. If you can't see an On Page Setup section, your key is most likely an older popup key. In this case, the edit screen gives you the option to reset all the mappings for your look-up. This will make the lookup button on your site appear as ‘Set-up PCA Predict’ and allow you to remap the look-up.

My account credentials are visible in my website source code - is this safe?

Your account details can be restricted to your specific URL in fact we recommend you do this. This means that even with code types where your details are visible, they are still safe and secure. Anyone attempting to use them from another site would have their requests rejected and you’d be alerted via email.

Why don’t I get a county returned with my address?

Counties are no longer a required part of the address and Royal Mail have not supported them since 1999. This means for areas such as London we do not return a county as part of the address. Don’t panic! You have a number of options if you want to also have a county returned with our service. Simply log in to your account, select "Your details and settings" and click on "Edit these settings" within the UK Counties pane. You can then choose between the following options:

  • Default county - (Recommended)
  • Former postal county - (as used by the Royal Mail until 1999)
  • Administrative county - (this is the strict, government name of the top level administrative body which is either a county or a unitary authority)
  • Traditional county - (this is the county name before the reorganisations that started in the 70's)
Can I turn off browser autofill?

Yes, for the best experience when using the Loqate address capture service, we recommend the browser autofill functionality is turned off for address form fields.
Firstly, below where the Loqate Tag script has been placed on the page, insert the following JavaScript code snippet: 

pca.on("load", function(type, id, control){
  var isChrome = !! || !!;
  if (isChrome == true){
    for (i=0; control.fields.length > i; i++){
      pca.getElement(control.fields[i].element).autocomplete = "PCATEST";

On the Address Form Fields, we have found success in adding the attribute autocomplete="none", to disable the browser's autofill. For example: 

autocomplete="none" placeholder="Start typing your address"  autofocus name=“searchTerm” />

It is recommended to test this code across multiple popular web browsers. 

I'm getting an Invalid ID error when using the Retrieve service - what does this mean?

The 1001 ID Invalid error message indicates that you are passing the wrong type of ID into the Retrieve service. You should only pass an ID from the Find service where the Type was returned as "Address". Passing IDs of type "Postcode" will not result in a retrieve - instead, these should be passed back into the Find service as "Container" until an "Address" type is returned.

Address API example

First, use the Find method, triggering a lookup after each user keystroke in a search box.

Example request:

Present the Text/Description portion of the response to the user, usually in a container that allows them to click on a desired result. When the user clicks an item, check the "Type" portion of the item:

  • If the Type parameter is anything but "Address", perform another Find putting the Id into the Container parameter. Maintain the Container parameter until another click is made. Note the Type parameter will only be "Address" when it is a full address the user is selecting, otherwise they need to carry on narrowing down their search results by either typing more or clicking a further item from the results. 
    Example subsequent Find:|RM|A|P-WR2-4AA&Origin=&Limit=&Language=&Countries=
  • If the Type parameter is "Address" then perform a Retrieve using the Id for that item from the response.
    Example Retrieve:
Can I block specific IPs?

Yes, our IP Limiter blocks all IPs that are not on your valid IP list. Only the IPs on your valid IPs list can do lookups. the list of your valid IPs can be found under Menu > Your Services > Click on the Key and 'Limits'. 

IP is blocked but not on blacklist

If you get a message saying a certain IP is blocked but this IP is not on your blacklist then that means IP Limit is enabled. 'Limit by IP' means you can restrict the service to specific IP addresses. If the blocked IP is not on the 'Limit by IP' list it can't use the service.

If the IP is valid, you can add it to the 'Limit by IP' list to enable access. You can find 'Limit by IP' under Menu > Your Services > Click on the specific Key and select 'Limits'. 

Platform Update - 4 May 2021

As part of Loqate’s commitment to service improvement, scalability and security of our platform, we are making a change to the end point,

As a result, you may need to make changes if you have implemented our address capture through an API. You will need to review your implementation if you have whitelisted our IP addresses in your firewall rather than our services URLs, or if you are making your API calls direct to one of our IP addresses. If this is not the case and you have used our quick set-up tag installation then no action should be needed. 

What do I need to do?
If your API calls link to a single IP address, you need to change the IP address you make requests to. You can find the details in our implementation guidance.

It’s critical that you make these changes by 4th May 2021If you have locked down the use of our services to a single IP address our services will stop working. 

Why do I need to do this?
As outlined in our implementation guidance, we strongly recommend you do not make API calls to a single IP address. Our products are load-balanced across multipe data centres which all make requests to our service URLs. Bypassing this and binding to a single IP address or subnet exposes you to additional risk and required updates as we make changes to our IP space frequently.

Any questions? Our support team is available 24/5. Just give us a call or use the chat functionality. 

Get started for free today

  • No credit card required
  • Cancel any time
  • 24/7 support
Get started