Skip to content

DOCS-1422 - Add Intellimize/Optimize snippet to headTags#6342

Open
kimsauce wants to merge 2 commits intomainfrom
staging/DOCS-1422
Open

DOCS-1422 - Add Intellimize/Optimize snippet to headTags#6342
kimsauce wants to merge 2 commits intomainfrom
staging/DOCS-1422

Conversation

@kimsauce
Copy link
Collaborator

@kimsauce kimsauce commented Feb 24, 2026

Purpose of this pull request

Add Intellimize code snippet. This allows us to use Optimize in the future for creating new UX/CTA experiences.

Testing on staging

  • No errors in Console
  • Verified all Intellimize tags are present in <head>: anti-flicker style block, inline init script, cdn.intellimize.co/snippet/117845498.js, and all three <link rel="preconnect"> tags
  • Network tab confirmed both requests returned 200 OK: snippet loaded from cdn.intellimize.co and context API call to api.intellimize.co/context-v2/117845498
  • window.intellimize in the console returns a fully initialized object with ready, push, allowUserTracking, denyUserTracking, getUserTrackingChoice, and more — confirming the full snippet loaded and executed successfully

Select the type of change

  • Minor Changes - Typos, formatting, slight revisions
  • Update Content - Revisions, updating sections
  • New Content - New features, sections, pages, tutorials
  • Site and Tools - .clabot, version updates, maintenance, dependencies, new packages for the site (Docusaurus, Gatsby, React, etc.)

Ticket (if applicable)

https://sumologic.atlassian.net/browse/DOCS-1422

@kimsauce kimsauce self-assigned this Feb 24, 2026
@cla-bot cla-bot bot added the cla-signed Contributor approved, listed in .clabot file label Feb 24, 2026
@kimsauce kimsauce added the do-not-merge Pull requests that should not be merged label Feb 24, 2026
@jpipkin1
Copy link
Collaborator

jpipkin1 commented Feb 24, 2026

@kimsauce, what should I be looking for in staging?

@kimsauce kimsauce marked this pull request as draft February 24, 2026 21:22
@kimsauce
Copy link
Collaborator Author

@kimsauce, what should I be looking for in staging?

Thanks for asking! Here are the steps I took to verify the Intellimize snippet is working on staging:

  1. Open DevTools on the staging site.
  2. Elements tab → inspect <head> and confirm the anti-flicker style, init scripts, and three <link rel="preconnect"> tags are present.
  3. Network tab → filter by "117845498" and reload. Confirm two requests both return 200 OK:
    • cdn.intellimize.co/snippet/117845498.js (script load)
    • api.intellimize.co/context-v2/117845498 (API call)
  4. Console tab → type window.intellimize and confirm it returns a fully initialized object (not undefined).
  5. Confirm no errors in the console and the page renders normally.

@kimsauce kimsauce marked this pull request as ready for review February 25, 2026 08:37
@jpipkin1
Copy link
Collaborator

Awesome, @kimsauce! Thanks for the verification steps.

Copy link
Collaborator

@jpipkin1 jpipkin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kimsauce, using Dev Tools, in staging I got this error on the Console tab:

117845498.js:4 https://helpdocs-sumo-logic.pantheonsite.io is not allowed to receive this data. If you’re expecting data to work here, check the Allowed Domains list at https://app.intellimize.com

Image

@kimsauce
Copy link
Collaborator Author

@kimsauce, using Dev Tools, in staging I got this error on the Console tab:

117845498.js:4 https://helpdocs-sumo-logic.pantheonsite.io is not allowed to receive this data. If you’re expecting data to work here, check the Allowed Domains list at https://app.intellimize.com

Image

@jpipkin1 , oh, good catch! I missed this warning. I'll double-check with Vince, but I believe this is expected behavior. Our Allowed Domains list only has the production domain (sumologic.com), but not our Pantheon staging URL. So the snippet loads and initializes fine, but Intellimize won't serve data to it.

@vfalconisumo
Copy link
Collaborator

I've only got one reservation:

Optimize uses CSS to prevent the page flickering while Optimize loads tests (it's the anti-flicker class in the snippet). To speed that step of the page load, Optimize recommends inserting the snippet as early in the head as possible.

I'm not 100% on how our Docusaurus setup works, but is it possible to add the Optimize snippet directly to a base template rather than using the headTags config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Contributor approved, listed in .clabot file do-not-merge Pull requests that should not be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants