WordLift Cloud
Bring WordLift’s semantic markup to any site by loading a single launcher script.
If you are using WordPress, you can use the WordPress Plugin to inject bootstrap.js instead of adding the script manually.
Before you start
- A WordLift Cloud account and access key (contact us if you need one).
- Access to add scripts in the
<head>of your pages. - (Optional, but recommended for multilingual sites) Set the page language with
<html lang="...">so the correct graph is selected.
Add the WordLift Cloud script
Place the launcher in the <head> of every page you want to annotate:
<!-- WL Cloud -->
<script async type="text/javascript" src="https://cloud.wordlift.io/app/bootstrap.js"></script>
<!-- End WL Cloud -->
Keep it near the top of <head> so it loads early; async ensures it does not block rendering.
bootstrap.js FAQ
1. What does it do?
The WordLift Cloud launcher (bootstrap.js) is a JavaScript script that you add to your website. Its main function is to load WordLift Cloud features on the page.
When installed, the script:
- Connects the page to WordLift Cloud services.
- Retrieves structured data (JSON-LD) generated through WordLift annotations.
- Injects that structured data into the page markup.
- Enables the WordLift Sidebar widget for annotating entities and managing semantic metadata.
These annotations are stored in WordLift Cloud and automatically published as schema.org JSON-LD markup on the page.
2. How do you use it?
To use WordLift Cloud, add the launcher script to the <head> section of every page you want to annotate.
<!-- WL Cloud -->
<script async type="text/javascript" src="https://cloud.wordlift.io/app/bootstrap.js"></script>
<!-- End WL Cloud -->
Recommended implementation details:
- Place the script near the top of
<head>so it loads early. - Use the
asyncattribute so it does not block page rendering. - Alternatively, deploy the same script through Google Tag Manager using a Custom HTML tag triggered on all page views.
3. How are cookies involved?
The bootstrap.js script does not use cookies or similar client-side tracking technologies and does not store any information in the user's browser.
4. Do we share personal data with WordLift?
No personally identifiable information is collected through the script. The system records only an anonymized IP address for operational logging purposes. This IP address cannot be linked to an individual and is automatically removed when the log retention period ends.
FAQ rendering (overview)
FAQ rendering activates only if all of the following are true:
-
The bootstrap detects a
FAQPageobject in the loaded JSON-LD. -
FAQ rendering is enabled via the
data-faqattribute or global config. -
A DOM element matching
data-faq-target-idexists. -
A template is provided in the page via:
<script type="text/template" id="wl-faq-template" hidden>
<!-- Mustache template here -->
</script> -
Mustache and DOMPurify are lazy-loaded only at this stage.
-
Answer HTML is sanitized using a strict allow-list of tags permitted by Google Search for FAQ rich results:
h1–h6, br, ol, ul, li, a, p, div, b, strong, i, em
All other tags and attributes are removed. JSON-LD itself remains untouched and contains no custom configuration fields.
Usage in HTML (FAQ)
Enable FAQ rendering when loading the bootstrap:
<script
async
src="https://cloud.wordlift.io/app/bootstrap.js"
data-faq="true"
data-faq-target-id="faq-container"
data-faq-template-id="wl-faq-template"
></script>
Insert the FAQ template:
<script type="text/template" id="wl-faq-template" hidden>
<ul class="faq-list">
{{#faqs}}
<li class="faq-item">
<strong class="faq-question">{{question}}</strong>
<div class="faq-answer">{{{answer}}}</div>
</li>
{{/faqs}}
</ul>
</script>
Provide the target container:
<div id="faq-container"></div>
When the loaded JSON-LD includes a FAQPage and FAQ rendering is enabled, sanitized FAQ markup is inserted automatically.
Configuration options
Configuration is read from <script data-*> attributes and can be overridden with window._wlCloudSettings.
| Attribute | Description |
|---|---|
data-faq | "true" to enable FAQ rendering |
data-faq-target-id | DOM element ID to inject FAQ markup into |
data-faq-template-id | Script/template element ID for rendering (defaults to wl-faq-template) |
data-sidebar-url | URL for the sidebar feature |
data-disable-jsonld | "true" disables JSON-LD loading |
data-web-page-url | Overrides detected page URL |
data-target-origin | Target origin for postMessage |
data-api-url | URL template for fetching JSON-LD |
data-data-formatter | Optional formatter hint passed to the API |
Annotate a page
- Open a page where the script is installed.
- Log in with your WordLift Cloud credentials.
- Launch the WordLift Sidebar widget with
Ctrl + Alt + W. - Point and click the area you want to annotate.
- Pick the relevant entities; WordLift saves and publishes the JSON-LD automatically.
Multilingual behavior
The launcher reads the lang attribute on the <html> element and appends __wl_lang to requests automatically (for example lang="en" sets __wl_lang=en). See Multilingual Graphs for details.
Validate the markup
- Use Google’s Rich Results Test or your preferred structured data validator.
- Check your network panel for requests to
cloud.wordlift.io/app/bootstrap.jsto confirm the launcher loads. - View page source to verify JSON-LD is injected after annotating.
Troubleshooting
- Widget not opening: ensure you are logged in and the launcher is present in
<head>. - Language mismatch: set the correct
langon<html>; the launcher derives__wl_langfrom it. - Script blocked: check Content Security Policy and ad blockers that might block
cloud.wordlift.io. bootstrap.jsmust be in<head>directly; other loaders can delay markup so Google misses it.- Google Tag Manager is the only supported alternative loader (see GTM setup).
Need help?
Contact us and our concierge team will help you get the best out of WordLift Cloud.