Skip to main content

Tags, Variables and Enriching Data

Updated over 11 months ago

Privacy Disclaimer: Per our Terms of Use only anonymous information can be collected from website visitors. No information pushed to Mouseflow should contain information that could potentially identify individual website visitors. Please check out this article to see what data you cannot push to Mouseflow using custom tags/variables (this may vary by local regulations).


What are tags and variables?

Tags and Variables in Mouseflow let you easily organize and filter your session data in tools like Session Replay and Heatmaps. This makes it simple to focus on specific groups of visitors—like those who made a purchase, are logged in/logged out, or took certain actions. This allows you to gain more meaningful insights and find these sessions quickly.


Variables will be marked in green

Tags will be marked in blue

by default, Mouseflow will automatically collect variables for UTM parameters, Google Click Identifiers (glid) and there are some tags that will be picked up automatically for you.


What is the difference between a tag and variable?

Tags
Page-based, meaning they track specific actions like clicks or video plays on a particular page. Every time the action happens, the tag will fire and appear on that page depending on it's configuration. Tags usually will be a single string like empty cart or add to cart.

Variables

Session-based and store contextual data about the user’s session, such as UTM parameters or login status. A custom variable allows you to push a key/value pair into Mouseflow - two pieces of information like logged_in = true or saw_popup = false . If the same variable key is used with a different value during the session, the previous value is overwritten. Variables will not appear on the page list, only on the overall information of events detected.

Use Cases


Variables

  • Logged In/Out

  • User ID

  • Cart Value/Order Amount

  • Link tracking

  • Referrer Information

  • Coupon Code Entered (Coupon = SUMMER)

  • Campaign IDs

  • Payment Method

Tags

  • Error Messages Displayed

  • Add to Cart/Add to Basket

  • Events (e.g. Modal Clicked, Abandoned Cart, Up-sell/Cross-sell, empty cart)

  • Scroll Rate

  • Search bar used

  • Exited Pop-Up

  • Page Template Type


To learn more about setting up tags and variables

Did this answer your question?