Locadapt is designed to work with almost any web platform. If your specific platform isn’t covered in our other guides, you can use these general instructions to integrate Locadapt into your website.

1

Access Your Website's HTML

You’ll need to be able to edit the HTML of your website. This usually means accessing your site’s template or theme files.

2

Locate the Head Section

Find the <head> section in your HTML. This is usually near the top of the document.

3

Add Locadapt Code

Just before the closing </head> tag, add the following code:

<link rel="stylesheet" href="https://cdn.locadapt.com/locadapt.min.css" />
<script 
  src="https://cdn.locadapt.com/locadapt.min.js" 
  data-project-id="YOUR_PROJECT_ID"
></script>

Make sure to replace YOUR_PROJECT_ID with the actual project ID provided in the configuration page for your Locadapt project.

4

Save and Deploy

Save your changes and deploy your updated website.

After deploying, visit your live website to ensure Locadapt is working correctly. You may need to clear your browser cache to see the changes immediately.

Platform-Specific Notes

  • Static Site Generators: If you’re using a static site generator like Jekyll, Hugo, or Gatsby, add the Locadapt code to your base template or layout file.
  • Single Page Applications (SPAs) and Server-Side Rendering (SSR): If you get hydration errors / the script doesn’t work, you may need to make use of the data-defer-ssr and defer tags on the Locadapt script. For details, see the frontend frameworks guide.
  • General Advice: You may also want to check out some other special attributes like data-start-hidden or data-link-prevent-default which may be relevant for your specific use case — see the relevant section in the frontend frameworks guide for more details.

Troubleshooting

If you are using a modern frontend framework and have issues with hydration, links not updating, or UI flickering, please see the frontend frameworks guide. There may not be a guide for your specific framework, but the details on e.g. data-link-prevent-default will be highly relevant.

If you encounter any issues or don’t see Locadapt working on your site, try the following:

  1. Verify that you’ve replaced YOUR_PROJECT_ID with your actual Locadapt project ID.
  2. Ensure the Locadapt code is placed just before the closing </head> tag.
  3. Check your browser’s developer console for any JavaScript errors.
  4. Clear your browser cache and reload the page.

If you need further assistance or have questions about integrating Locadapt with a specific platform, don’t hesitate to contact our support team at support@locadapt.com.