Legacy Lens Inject
What Lens Inject is
Section titled “What Lens Inject is”Lens Inject is a small JavaScript snippet that loads the Lens runtime directly into a WordPress theme or site footer. It predates the Lens for WordPress plugin and does not include the admin-side UI for connection, audience, layout, theme, or sync status.
If you are installing Lens on a new site, stop here and use the plugin instead. Continue reading only if you are maintaining an existing Lens Inject install or planning a migration off it.
Why migrate
Section titled “Why migrate”The Lens for WordPress plugin gives you, in WordPress admin:
- A connection flow that does not require pasting tokens into theme code
- A master Enable widget switch
- Audience control (signed-in users vs all visitors)
- Layout and theme settings without code changes
- A visible sync status indicator and error reporting
- A clean uninstall path that does not leave script tags behind
A Lens Inject install gives you none of those. Configuration lives in theme code; sync status is invisible; mistakes require a developer to fix.
Modern install vs legacy install
Section titled “Modern install vs legacy install”What: install the Lens for WordPress plugin from inside WordPress admin and configure it through the plugin’s settings page.
Who it’s for: every new site, every site under active maintenance, and every site whose owner is comfortable installing a WordPress plugin.
Steps: see Install and Activate and Connect to TMXIO.
What: a hand-edited script tag in the theme or via a wp_footer filter, pointing at the Lens runtime and carrying a workspace token in code.
Who it’s still in use for: sites with locked-down theme upgrade paths, multi-tenant managed hosts that pre-baked Lens Inject into a parent theme, and a small number of legacy agency installs.
Caveats:
- Token rotation requires a code change and a redeploy.
- There is no audience control — visibility is decided at the theme layer.
- There is no sync status indicator; failures are silent.
- Uninstalling requires removing the snippet from the theme manually.
If your situation looks like this, you can keep running Lens Inject for now, but plan a migration window — see below.
Migrate from Lens Inject to Lens for WordPress
Section titled “Migrate from Lens Inject to Lens for WordPress”-
Confirm Lens for WordPress is supported on this site. Check WordPress and PHP versions against the plugin’s requirements — see Install and Activate. If the site is below the minimums, upgrade the stack before continuing.
-
Note the workspace your Lens Inject snippet is pointing at. Look at the snippet in your theme (or wherever Lens Inject is wired in) and record the workspace token or workspace identifier. You will need to connect the new plugin to the same workspace so existing feedback continues to land in the same place.
-
Install and activate the plugin. Follow Install and Activate.
-
Connect the plugin to the same workspace the Lens Inject snippet was pointing at — see Connect to TMXIO. For legacy installs, the Workspace token tab is usually the right choice since you already have the token in code.
-
Configure audience, layout, and theme in the plugin to match the behavior your Lens Inject snippet was producing — see Enable Widget and Audience and Panel Layout and Theme.
-
Verify that the widget renders on the site and that feedback submitted through the new plugin reaches the expected workspace. Use a private window to check the audience setting.
-
Remove the Lens Inject snippet. Once the plugin is fully working, delete the hand-installed script tag or
wp_footerfilter from your theme. Leaving both running can cause the widget to render twice or to fight over which instance is “real”. -
Deploy the theme change that removes the snippet. After deploy, reload the site and confirm only one Lens widget renders.
If you genuinely cannot migrate yet
Section titled “If you genuinely cannot migrate yet”Some sites will need to stay on Lens Inject longer — locked-down hosts, frozen themes, or contractual constraints. If that is you:
- Document which workspace the snippet points at so the token can be rotated cleanly.
- Add the migration to your next theme-update cycle, even if that is months out.
- When the constraint clears, return to the migration steps above.
Support continues to answer Lens Inject questions, but new feature work targets Lens for WordPress only.
Related
Section titled “Related”- Install and Activate — the modern install path.
- Connect to TMXIO — including the legacy workspace-token flow.
- FAQ — common questions about which Lens to use.