Definition
In Contentsquare, a dynamic variable is additional information attached to a user session. It is sent as a key and a value—for example, test_variant = “B”, feature_used = “quick_checkout”, or support_rating = 5—and can then be used to describe, segment, or filter sessions.
The defining feature is timing: unlike a custom variable, a dynamic variable can be sent at any point during a session and does not require a pageview. This makes it useful when context becomes known or changes after the page or screen has loaded, including an experiment assignment, a feature interaction, or an error state.
Dynamic variables can be implemented on the web or in mobile apps. Contentsquare documentation supports string and numeric values, with different analysis options for each. They are session context, not a substitute for a complete event taxonomy, identity strategy, or privacy review.
What does that mean
Imagine a session as a folder containing a user’s visit. A dynamic variable is like a labeled note added to that folder—such as “saw test B” or “used express checkout”—so you can find and compare the right folders later.
Why this matters
Dynamic variables connect changing context to the experience that followed. They help teams compare test groups, investigate feature use or errors, and find the sessions behind a pattern. Product and UX teams gain better evidence for decisions, while Data and IT teams can make the context consistent and usable across implementations.
Use cases
Compare A/B test variations
Product and Data teams may know which variation received more conversions but not why users responded differently. Send the experiment name and variation as dynamic variables when the experience is assigned, then build segments and inspect the related sessions. This makes it easier to compare behavior, spot friction in a losing variation, and decide what to improve or roll out.
Investigate feature use and technical issues
UX/UI and IT teams often need to connect a user experience to a feature flag, release state, or error condition. Add a dynamic variable when a feature is used or an issue occurs, then filter the relevant sessions and compare them with sessions without that context. The expected benefit is faster root-cause discovery and better prioritization of fixes that affect real users.
Carry changing context through a session
A useful value may only become available after a session starts—for example, the selected store, account type, rating, or number of items in a flow. Because dynamic variables can be sent during the session without forcing a pageview, teams can record that context when it becomes relevant. This keeps analyses closer to what actually happened and is especially useful for app sessions or experiences that change state.
How Contentsquare helps
User Segmentation — Use dynamic-variable context to create cohorts based on session characteristics, then compare behavior across groups.
Session Replay — Filter or investigate sessions associated with a specific variation, feature state, rating, or error context to see what users experienced.
Advanced Journey Analytics — Compare the journeys of context-based cohorts to identify drop-offs, unexpected paths, or patterns linked to a test or experience state.
Contentsquare Tag Configurator (CSTC) — Give implementation teams a visual way to configure dynamic variables, alongside manual code or tag-manager options.
FAQs on dynamic variable
It is a key-and-value label that adds context to a user session. In Contentsquare, examples include the A/B test variation shown, a feature used, a review rating, or an error condition.
The value can then be used to segment or filter sessions so teams can compare experiences that would otherwise look similar in aggregate.