# Liquid Session Variables

Source: https://support.storeconnect.com/articles/liquid-session-variables · Last modified 21 August 2026

A session variable is a temporary storage unit that holds data for a user's session on a website. It retains information fed to it while the user is active on the site and disappears when the session ends. A session usually ends because the browser was closed or the session expired. Liquid session variables allow you to temporarily store information that can be utilized within your Liquid theme.

For instance, you can capture specific user data while they navigate through a particular section of your site. Later, you can use this information to perform personalized actions or display relevant content based on the data gathered from the user.

A key feature of these variables is their accessibility throughout your store. They can be created, updated and retrieved anywhere in the store.

## Functionality of Session Variables

Session variables consist of a key and a value. The key helps reference the variable wherever it is intended to be used, while the value represents the data stored in it.

Here’s a simple example of how to set a session variable.


```liquid

{% session title: "My Store" %}
```


And here is how you retrieve that value:


```liquid

{{ session_variables["title"] }}
```


The output here would be **My Store**

It is also helpful to note that session variables can store values derived from other variables.

Example where the store is named **Acme Store**.


```liquid

{% assign name = current_store.name %}
{% session title: name %}
```



```liquid

{{ session_variables["title"] }}
```


Output = **Acme Store**.

## Important Note

These variables are declared within tags, and their results can be accessed using objects. Note that they are declared using session instead of assign.

---

## Follow StoreConnect

- [Email Newsletter](https://getstoreconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://getstoreconnect.com/partners)
- [News](https://getstoreconnect.com/articles/news)
- [Events](https://getstoreconnect.com/articles/events)
- [Feature Comparison](https://getstoreconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://getstoreconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

---

StoreConnect Support — https://support.storeconnect.com/articles/liquid-session-variables