AI Trim

Who can use this feature?
- Available with all plans. 
- Available for admins, architects, and standard users.

AI Trim is an AI-augmented tool that transforms any CSS selector into the most stable selector that still targets the same elements as the original.

“Most stable” here meaning:

  1. As short as possible, to be as resilient as possible to changes in your site markup
  2. Semantically relevant to your element, to increase human readability and use more high-quality selectors

Trimming Selectors

When using Data Studio to create elements, your CSS selectors will be AI-trimmed by default when inspecting the preview. As the trim is running, you can see the visualization of Fullstory improving your selector within the selector tree. This can time some time to process - you can cancel the trim at any time by clicking "cancel" in the selector tree view.


2024-05-31 14.43.02.gif


For existing elements, there is a "Trim" button above the selector tree that will trigger the trim at any time. Trim will be performed over active selector pieces only. This means that you can manually edit the selector using the selector, and click “Trim” to run the algorithm on any variation of your selector.

Best Practices and Important Notes

  1. Check for things that may over-specify your selector (maybe a .mobile class when you want the element for all screen types, or an ancestor that specifies your element to a specific container/page) because trim will honor the original targeting of the selector.
  2. Review the final selector to see if there are pieces you'd prefer to use - make sure to check against the metrics volume that your selector targets what you expect.
  3. Trim uses metrics to validate different versions of your selector. If your selector has very low-volume (<30 events), trim may be less accurate. If your selector has zero volume, trim cannot guarantee that the proposed selector has the same behavior as the original, since it has no behavior to validate against.

Need to get in touch with us?

The Fullstory Team awaits your every question.

Ask the Community Technical Support