Written By Calm Editorial Team
Clinically reviewed by Dr. Chris Mosunic, PhD, RD, CDCES, MBA
Learn about the importance of your nervous system, what it is, and how regulating your nervous system helps you manage stress.
It's perfectly natural to feel stressed or anxious from time to time. It happens to everyone. But high stress can have an impact on your body, particularly your autonomic nervous system, the part of your body responsible for regulating your breathing, heart rate, blood pressure, and digestion. By understanding how to regulate your nervous system, you can take proactive steps to manage stress, enhance your wellbeing, and live a more balanced life.
How does the automatic nervous system work?
The nervous system acts as the control center of your body. It’s responsible for everything from your heartbeat to digestion and even the way you feel. One part of it, the autonomic nervous system, is extremely important when it comes to your emotional wellbeing. It can be divided into two main parts: the sympathetic nervous system and the parasympathetic nervous system, both of which utilize hormones to help prepare us for what our brain perceives as our needs.
More specifically, when the brain perceives a threat, it turns on the sympathetic nervous system, aka our “fight or flight” response. The symptoms you feel—racing heart, sweaty palms, is the body’s way of preparing you for a stressful situation. The parasympathetic system, on the other hand, kicks in when our brain thinks it's a good time to recover, helping our body to calm down and recover.
Balance is key. Imagine the autonomic nervous system as a body of water with each side sending waves from the opposing shores. When the autonomic nervous system is balanced, both sides send waves of hormones in equal measure that diffuse each other and help us to feel in control. If the sympathetic nervous system pushes too many stress hormones we become anxious. If the parasympathetic nervous system pushes too many relaxation hormones we can feel muted and apathetic.
Our larger nervous system is important because it keeps nearly every aspect of your body working efficiently, but the autonomic nervous system within it is critical to our emotional health. When you encounter a stressful situation, your sympathetic nervous system helps you react appropriately by helping you spring into action. When it's time to recover, your parasympathetic nervous system helps you take a step back and relax. When you maintain a balance between the sympathetic and parasympathetic systems, your body is better equipped to respond appropriately to different situations, leading to better physical and mental health.
How stress impacts your nervous system
From tight deadlines at work to personal challenges at home, stress can come from anywhere. But what happens inside our bodies when we feel stressed?
When you’re feeling stressed, your body has a natural response to prepare you to manage the situation and feeling, which is why you might notice your heart rate increasing, your palms getting sweaty, or your muscles tensing. These are all signs that the sympathetic system is getting ready to either face the challenge or escape from it, hence “fight or flight”.
However, if our bodies are always in the state of high alert, problems can arise. Our bodies aren't designed to be constantly under stress. When the sympathetic system is working overtime and our bodies are continually flooded with cortisol and adrenaline, we can end up facing health issues. In the short term, we might feel tired, irritable, or have trouble sleeping. Over time, the continuous activation of the sympathetic nervous system can lead to us having more serious problems like high blood pressure, weakened immune function, and even heart issues.
What are the signs and causes of a dysregulated nervous system?
Sometimes, your body's way of responding to certain situations can fall out of sync. This off-balance state in your nervous system is called a dysregulated nervous system. There are many common signs that show your nervous system might be off track.
Recognizing these signs and understanding the causes is the first step in taking charge of your nervous system's health and restoring the balance, inviting your parasympathetic nervous system to activate and promote relaxation, lower blood pressure, steady breathing, and digestion.
Here are some of the signs you may be experiencing a dysregulated nervous system.
Anxiety
Panic attacks
Digestive issues
Trouble sleeping
Constant fatigue
Persistent muscle pain
There are also many stressors that can disrupt nervous system balance, including:
Chronic stress
Burnout
Traumatic events
Poor sleep habits
Unhealthy diet
Not taking time to relax
How to regulate your nervous system: 13 techniques to restore balance
If you ever feel off-balance or just need a moment of calm, try these simple techniques to help regulate your nervous system. Whether through deep breathing, mindfulness, or even a good laugh, find what works best for you and prioritize your nervous system's health.
1. Try a physiological sigh or other breathing exercises
A physiological sigh is a natural deep breathing pattern consisting of two quick inhales followed by a longer exhale. It can help calm the sympathetic system and activate the parasympathetic system.
💙 Explore deep breathing and learn to Breathe Like the Ocean with Jeff Warren.
2. Move your body
Exercise can be a great way to relieve stress and regulate the nervous system. Take a walk, practice yoga, or dance around your living room to your favorite song. Physical activity may help release tension and help your body feel more relaxed.
💙 Learn how Movement can change your life and ease your mind with Dr. Rangan Chatterjee in The 4 Pillars of Health.
3. Use a weighted blanket
A weighted blanket may activate your parasympathetic nervous system through deep pressure touch. This form of therapy uses touch and feeling sensations as a calming technique. The combination of a weighted blanket and the activation of your parasympathetic nervous system can help to naturally relax your body and calm your mind.
💙 Feel the weight of deep pressure touch, and learn to release the burdens you don’t have to carry with Jay Shetty’s Put Down the Weight meditation.
4. Meditate to help calm your mind
Meditation can offer many benefits, including helping to reduce stress and restore the nervous system. Try sitting in a quiet space, closing your eyes, and focusing on your breath or a calming phrase. This may help center your thoughts and calm your mind.
💙 Defuse Stress with Kindness in this 8-minute meditation on rebalancing your mind and ridding your body of stress.
5. Introduce mindfulness into your routine to help reduce stress
Focusing on mindfulness, or being present in the current moment can be therapeutic and help ground you and remind you to exist in the now. Try grounding yourself by feeling the earth beneath your feet, the texture of an object in your hand, or the feeling of wind against your skin.
💙 Relax into your body and learn to Slow the Swirl in Your Mind in less than two minutes a day.
6. Sing or laugh
Singing and laughing can both stimulate the vagus nerve, the main nerve in your parasympathetic nervous system, which can help you feel relaxed. Singing and laughing also increase your intake of oxygen, which can help with improving energy and mood.
💙 Discover the root of laughter in What Is Happiness with happiness expert Shawn Anchor.
7. Give yourself a massage or a hug
Touch can be a powerful tool for relaxation. Give yourself a healing massage by gently rubbing your temples, neck, arms, or feet, where stress can often be stored. Or try wrapping your arms around yourself for a hug, which can provide comfort and a sense of security.
💙 Indulge in the power of physical touch while listening to Kaitlyn Aurelia Smith’s Understanding Body Messages soundtrack for an extra dose of self-love.
8. Try tapping
Emotional Freedom Technique (EFT) is an emerging practice that involves gently tapping specific points on your body while focusing on a calming phrase. Some common areas to engage in tapping include the outer palm, center of your forehead, below your nose, and below your lip, just to name a few.
💙 Learn how to Overcome Stress and Anxiety to further calm your nervous system.
9. Place your feet on the earth
Preliminary evidence suggests that direct contact with the ground (known as earthing) may help calm the nervous system and bring it back into balance. Grounding yourself can be as simple as placing your bare feet on the earth.
💙 Offer gratitude for the world around you in this Daily Calm meditation, Earth, led by Tamara Levitt.
10. Connect with nature
Step outside and feel the sun on your skin or listen to the birds. Nature can have a calming influence and may promote mindfulness and a feeling of being present, both of which can be naturally relaxing.
💙 Connect with nature and connect with yourself with We Are Nature by Jay Shetty.
11. Take a cold shower
The shock of a cold water shower can jolt the nervous system. This may help reduce stress.
💙 Prepare yourself for discomfort and expand the boundaries of your comfort zone in this episode of the Daily Jay, Cold Showers.
12. Use co-regulation
Co-regulation is where people tune into each other's emotional states, which can help stabilize and balance the nervous system. This can mean talking to someone you trust and practicing empathy, as sharing and experiencing feelings can be a great way to regulate emotions.
💙 Broaden your personal horizons and learn the importance of establishing Relationships with Others.
13. Prioritize sleep
Sleep is when our bodies rejuvenate, rest, and become restored. During sleep, our brain not only rests but also uses this time to allow its neurons to communicate with one another, leading to regulation. Sleep can also help clear your mind from stressors, which help you wake feeling refreshed.
💙 Soothe yourself to sleep with Calm’s Gently Back to Sleep playlist.
How to regulate nervous system FAQs
How do you rebalance your nervous system?
Rebalancing your nervous system means getting back to a state where you feel calm and centered. You can try practicing deep breathing exercises, spending time in nature, or taking short breaks during the day. Regular sleep, a balanced diet, and talking to someone you trust can also help.
How do you regulate an overactive nervous system?
If you feel overly jittery, anxious, or just can't seem to relax, your nervous system might be in overdrive. To calm it down, start by taking deep breaths. This simple act can signal your body to relax. Consider avoiding caffeine or other stimulants as they can make things worse, and, instead, engage in calming activities, such as reading, listening to soft music, or practicing mindfulness to help regulate an overactive nervous system. If these feelings persist, speak with a healthcare professional for personalized advice.
What are the symptoms of an overstimulated nervous system?
An overstimulated nervous system can make you feel restless and anxious or even cause physical symptoms like a racing heart. Other signs might include trouble sleeping, feeling on edge, or being easily startled. Some people might experience headaches, muscle tension, or digestive problems. If you notice these signs, listen to your body and take steps to calm down.
How do I know if my nervous system is messed up?
If your nervous system isn't functioning properly, you might experience signs like constant fatigue, difficulty concentrating, or feeling overly anxious or depressed. Physical signs can range from sleep issues to digestive troubles. Remember, your body has its own ways of letting you know when something isn’t right, so pay attention to these signals and seek advice if needed.
What are the signs of a dysregulated nervous system?
A dysregulated nervous system can show up in various ways. Common signs include feeling anxious, having unexpected panic attacks, and struggling with sleep. You might also experience digestive problems, feel tired all the time, or have muscle pain with no obvious cause. Recognizing these signs is the first step toward finding balance and feeling better. If you have concerns, reach out to a healthcare professional.
Calm your mind. Change your life.
Mental health is hard. Getting support doesn't have to be. The Calm app puts the tools to feel better in your back pocket, with personalized content to manage stress and anxiety, get better sleep, and feel more present in your life.
` const popupFortyOffHtml = `
Limited Time Offer! 40% off Calm Premium
- 50,000+ minutes of premium content
- New guided content every week
- Cancel anytime
Get Calm Premium
` const popupEmailHtml = `
Sign up for free tips to sleep more and feel better
- Exclusive discounts to Calm Premium
- Free newsletter with tips and content to help with your mental health journey
Thank you! Your submission has been received!
Something went wrong while submitting the form. Try again.
By clicking Submit, you consent to receiving marketing and informational messages from Calm about its products and services.
`const handlePopup = () => {if (document.documentElement.scrollTop >= (height * percentOfPage)) {scrollDistance = window.pageYOffsetpopup.classList.add('active')overlay.classList.add('active')body.classList.add('popup-active')body.style.top = `${scrollDistance * -1}px`amplitude.track(`Blog : Popup CTA : Seen`, { page_name: currentPath, calm_user_id: null, cta_name: `${popupName} Popup` });}}const handleClosePopup = () => {popup.classList.remove('active')overlay.classList.remove('active')body.classList.remove('popup-active')body.style.top = nullwindow.scrollBy(0, scrollDistance); amplitude.track(`Blog : CTA : Clicked`, { page_name: currentPath, calm_user_id: null, cta_name: `${popupName} Popup Dismiss` });document.removeEventListener('scroll', handlePopup)document.cookie = 'calmblogtrial=1; max-age=31536000; path=/;'localStorage.setItem('calmblogtrial', 1)}const popupInit = (popupHtml, popupEventName) => { popupName = popupEventNamedocument.body.insertAdjacentHTML('afterbegin', popupHtml)popup = document.getElementById('popup')overlay = document.getElementById('popupOverlay')const closeBtn = document.getElementById('closePopupBtn') const popupLinks = document.querySelectorAll('.popup-link')document.addEventListener('scroll', handlePopup)overlay.addEventListener('click', handleClosePopup)closeBtn.addEventListener('click', handleClosePopup) popupLinks.forEach(link => { link.addEventListener('click', () => { amplitude.track(`Blog : CTA : Clicked`, { page_name: currentPath, calm_user_id: null, cta_name: `${popupName} Popup Success` }); }) })}if (!popupAlreadyShown) { if (trialUrls.includes(currentPath)) popupInit(popupTrialHtml, 'Free Trial') else if (fortyOffUrls.includes(currentPath)) popupInit(popupFortyOffHtml, '40_Off') else if (emailUrls.includes(currentPath)) popupInit(popupEmailHtml, 'Email') }}); // web2app blockdocument.addEventListener('DOMContentLoaded', function () { // Step 1: Detect if the user is on a mobile device var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || (window.innerWidth <= 768); if (isMobile) { // Steps 2 and 3: Generate OneLink URL and prepare the HTML snippet (Mobile Only) var currentPath = window.location.pathname; var oneLinkURL = "https://calm.onelink.me/msVo"; var webReferrer = "af_sub1"; var mediaSource = { defaultValue: "calm_blog" }; var campaign = { defaultValue: currentPath }; var custom_ss_ui = { paramKey: "af_ss_ui", defaultValue: "true" }; var newUrl = window.AF_SMART_SCRIPT.generateOneLinkURL({ oneLinkURL: oneLinkURL, webReferrer: webReferrer, afParameters: { mediaSource: mediaSource, campaign: campaign, afCustom: [custom_ss_ui] } }).clickURL; const htmlSnippet = `
Start your 14-day free trial of Calm Premium.
Full access to 50,000+ minutes of content and tools
Guided courses and plans to help you reach your specific goals
Personalized recommendations based on your preferences
Gentle reminders to help you build a practice
Download App for Free
`; // Modify as needed // Step 4 (Mobile): Find and replace all 'trial-cta' elements const trialCtaElements = document.querySelectorAll('.trial-cta:not(#popup)'); if (trialCtaElements.length) { trialCtaElements.forEach(function(element) { element.outerHTML = htmlSnippet; }); } else { // Step 5 (Mobile Only): Handle case where 'trial-cta' is not found const targetElement = document.querySelector('.blog-item-content .sqs-block.html-block.sqs-block-html'); if (targetElement) { targetElement.insertAdjacentHTML('afterend', htmlSnippet); } } }}); // Email form code document.addEventListener("DOMContentLoaded", function() { var customHTML = `
Stress less, sleep more, and feel better with Calm.
Find out how Calm can support you on your mental health journey.
Thank you! Your submission has been received!
Something went wrong while submitting the form. Try again.
By clicking Submit, you consent to receiving marketing and informational messages from Calm about its products and services.
`; var targetElement = document.querySelector('.sections'); if (targetElement) { targetElement.insertAdjacentHTML('afterend', customHTML); }}); // Email form success/errordocument.addEventListener("DOMContentLoaded", function() { emailFormHandler()}); // Harry Styles Audio Sample document.addEventListener("DOMContentLoaded", function() { const excludedPaths = [ '/blog/calma-sutra-sleep-positions', '/blog/kevin-bacon-dream-boat', '/blog/calm-calendars', ]; const currentPath = window.location.pathname; if (excludedPaths.includes(currentPath) || currentPath.includes('content/de')) { return; // Exit the script if the current URL is in the excluded list } const blogWrapper = document.querySelector('.col.sqs-col-12.span-12'); if (blogWrapper) { const allRows = [...blogWrapper.querySelectorAll('.row.sqs-row')]; const filteredRows = allRows.filter(row => row.querySelector('img') && row.querySelector('a')); const newHtml = `
Listen to the full audio on Calm, the #1 app for sleep, meditation and relaxation
Fall asleep and fall in love with the dreamy voice of Harry Styles.
Try Calm for Free
`; if (filteredRows.length > 0) { const secondFilteredRow = filteredRows[1]; secondFilteredRow.insertAdjacentHTML('afterend', newHtml); secondFilteredRow.style.display = 'none'; } else { const htmlBlockDiv = blogWrapper.querySelector('.sqs-block.html-block.sqs-block-html'); if (htmlBlockDiv) { htmlBlockDiv.insertAdjacentHTML('afterend', newHtml); } } }}); // Audio Sample Functionality Codewindow.onload = function() { // Replace 'audioFileURL' with the direct link to your audio file const audioFileURL = 'https://static1.squarespace.com/static/57b5ef68c534a5cc06edc769/t/65a78d86aa34af6af3428203/1705479566073/SLEP_0184_DreamWithMe_EN_2CH_MK_20230802_HomepageCutdown.mp3/original/SLEP_0184_DreamWithMe_EN_2CH_MK_20230802_HomepageCutdown.mp3'; // Getting the play/pause button by its ID and icons by their IDs const playPauseButton = document.getElementById('harry-styles-sleep-story-play-pause-button'); const playIcon = document.getElementById('harry-styles-sleep-story-play-icon'); const pauseIcon = document.getElementById('harry-styles-sleep-story-pause-icon'); // Check if elements exist if (playPauseButton && playIcon && pauseIcon) { // Initially hide the pause icon pauseIcon.style.display = 'none'; // Creating the audio object const audio = new Audio(audioFileURL); // Event listener for play/pause button playPauseButton.addEventListener('click', function() { if (audio.paused) { audio.play(); playIcon.style.display = 'none'; pauseIcon.style.display = 'block'; } else { audio.pause(); playIcon.style.display = 'block'; pauseIcon.style.display = 'none'; } }); // Dispatch the custom event after the player is ready let e = new Event("amplitudeaudioloaded"); document.dispatchEvent(e); }}; // Harry Styles Tracking Codedocument.addEventListener("DOMContentLoaded", function() { // Function to extract a specific part of the URL slug function getSlugPart() { var path = window.location.pathname; // Get the pathname of the URL var slug = path.split('/').pop(); // Split the pathname by '/' and get the last part return slug || 'Unknown'; // Return the slug part or 'Unknown' if it's not available } // Function to set UTM parameters on the specified button/link function setUTMParameters() { var slugPart = getSlugPart(); // Get the specific part of the slug var buttonLink = document.getElementById('harry-styles-sleep-story-cta-button'); // Select the button/link with the specified ID if (buttonLink) { var originalUrl = buttonLink.href; var utmParameters = `utm_source=blog&utm_campaign=${encodeURIComponent(slugPart)}&utm_medium=organic`; // UTM parameters with the slug part var separator = originalUrl.includes('?') ? '&' : '?'; // Determine if we need to start with '?' or append with '&' buttonLink.href = `${originalUrl}${separator}${utmParameters}`; // Append UTM parameters to the URL } } setUTMParameters(); // Execute the function when the page loads}); // Quiz Flow Tracking Codedocument.addEventListener("DOMContentLoaded", function() { var currentPath = window.location.pathname; // Define the lists of allowed URLs for each HTML snippet var allowedUrlsSnippet1 = [ '/blog/coffee-nap', '/blog/your-child-wont-sleep', '/blog/introducing-liminal-sleep-by-sigur-ros', '/blog/sunday-night-sleep-troubles', '/blog/sleep-tracking-orthosomnia', '/blog/bedtime-yoga', '/blog/screen-time-before-bed', '/blog/view-from-above', '/blog/golf-best-sport-to-cure-insomnia', '/blog/power-nap', '/blog/afternoon-slump', '/blog/sleep-myths-tips-to-optimize-sleep', '/blog/the-trail-to-machu-picchu', '/blog/wild-sweden', '/blog/sleep-paralysis', '/blog/how-to-prevent-nightmares', '/blog/black-rest-brittney-oliver-black-history-month', '/blog/7-sleep-myths-busted', '/blog/sleep-languages', '/blog/sleep-schedule-in-flux', '/blog/waking-up-tired', '/blog/the-jk-rowling-of-slow-literature-worlds-first-sleep-storyteller-in-residence-joins-calm', '/blog/the-temples-of-shodoshima', '/blog/wind-down-time', '/blog/de-stressing-work-travel', '/blog/how-to-become-a-morning-person', '/blog/revenge-bedtime-procrastination', '/blog/racing-thoughts-at-night', '/blog/wild-nights-sleep', '/blog/how-to-get-more-deep-sleep', '/blog/sleep-superpower-playbook', '/blog/magic-of-yurts', '/blog/drift-off-to-sleep-with-harry-styles', '/blog/the-last-storytellers', '/blog/why-do-i-keep-waking-up-at-3am', '/blog/the-10-most-widely-held-myths-and-why-theyre-wrong', '/blog/what-is-green-noise', '/blog/jerome-flynn-chooses-mindfulness-over-the-sword', '/blog/how-to-wake-yourself-up', '/blog/what-is-the-best-environment-for-sleep', '/blog/the-black-pearls-of-tahiti', '/blog/tips-for-women-with-insomnia', '/blog/tik-tok-tale', '/blog/once-upon-a-time-in-bavaria', '/blog/middle-of-the-night-insomnia', '/blog/bedtime-challenge', '/blog/stephen-fry-sleep-story-blue-gold', '/blog/the-healing-practices-of-poetry-and-meditation', '/blog/baa-baa-land-premiere', '/blog/the-river-wild', '/blog/a-cure-for-insomnia-lulled-to-sleep-by-cricket-the-game-not-the-insect', '/blog/dia-de-muertos', '/blog/why-do-we-dream', '/blog/vivid-dreams', '/blog/sleep-anxiety', '/blog/coffee-nap', '/blog/lost-grimm-fairy-tale-is-first-ai-bedtime-story', '/blog/dream-journal', '/blog/best-music-to-fall-asleep-to', '/blog/soothe-yourself-to-sleep-with-the-shipping-news', '/blog/sloths-are-the-worlds-greatest-sleep-and-relaxation-ambassadors', '/blog/sleep-mist', '/blog/the-thinking-behind-sleep-stories' ]; // Replace with actual URLs var allowedUrlsSnippet2 = [ '/blog/benefits-of-silence', '/blog/high-functioning-anxiety', '/blog/journaling-for-anxiety', '/blog/eco-anxiety-coping-tips', '/blog/what-is-asmr', '/blog/music-to-relieve-stress', '/blog/5-4-3-2-1-a-simple-exercise-to-calm-the-mind', '/blog/how-to-meditate-for-anxiety', '/blog/emotional-stress', '/blog/how-to-stay-calm-under-pressure', '/blog/relaxation-ideas', '/blog/panic-attack-vs-anxiety-attack', '/blog/how-to-calm-your-mind', '/blog/box-breathing', '/blog/driving-anxiety', '/blog/panic-attack-meditation', '/blog/holiday-stress', '/blog/difference-between-stress-and-anxiety', '/blog/postpartum-anxiety', '/blog/tips-for-managing-stress', '/blog/ai-anxiety-tips', '/blog/anticipatory-anxiety', '/blog/3-3-3-rule-anxiety', '/blog/grounding-techniques', '/blog/vacation-anxiety' ]; // Replace with actual URLs var allowedUrlsSnippet3 = [ '/blog/when-saying-no-is-the-nicest-thing-you-can-do', '/blog/celebrate-black-history-month-with-renowned-jazz-writer-and-cultural-critic-greg-thomas', '/blog/october-2021-calm-calendar', '/blog/focused-meditation', '/blog/emergency-calm-how-to-calm-down-in-2-minutes', '/blog/mindful-movement-challenge', '/blog/meditation-for-sleep', '/blog/a-grateful-heart', '/blog/february-2022-calm-calendar', '/blog/november-2022-calm-calendar', '/blog/august-2021-calm-calendar', '/blog/calm-classrooms-free-mindfulness-training-tools-for-every-teacher-in-the-world', '/blog/abc-minding-your-mind-dr-rheeda-walker', '/blog/march-is-all-about-sleep', '/blog/mindfulness-meditation-for-mental-health', '/blog/accepting-lifes-imperfections', '/blog/3-tips-for-a-stress-free-thanksgiving', '/blog/a-loving-kindness-meditation', '/blog/try-these-tips-for-a-stress-free-daily-commute-to-work', '/blog/january-2022-calm-calendar', '/blog/how-to-sleep-better-guide', '/blog/holdingstrong', '/blog/5-simple-tips-to-make-meditation-a-daily-habit', '/blog/disney-princess-mindful-wisdom', '/blog/thanksgiving', '/blog/the-story-behind-peacebunny-island', '/blog/january-2023-calm-calendar', '/blog/running-meditation', '/blog/march-2023-calm-calendar', '/blog/how-to-hack-holiday-stress-and-anxiety', '/blog/why-you-cant-put-down-your-phone', '/blog/20-ways-to-take-a-mindful-break', '/blog/december-2022-calm-calendar', '/blog/5-mindfulness-practices-to-help-reduce-anxiety', '/blog/are-affirmations-wearing-you-down', '/blog/get-out-of-your-head-and-into-your-life-with-septembers-mindful-living-calendar', '/blog/time-and-how-to-spend-it', '/blog/june-2023-calm-calendar', '/blog/januarys-upcoming-daily-calm-meditations', '/blog/5-ways-to-improve-your-sleep-with-mindfulness-practices', '/blog/is-it-okay-to-lie-down-while-meditating', '/blog/september-2023-calm-calendar', '/blog/september-2021-calm-calendar', '/blog/how-to-be-more-present', '/blog/july-2023-calm-calendar', '/blog/july-2021-calm-calendar', '/blog/the-expansive-joy-of-doing-nothing', '/blog/floating-with-floridas-manatees', '/blog/put-yourself-at-the-top-of-your-to-do-list-with-augusts-mindful-living-calendar', '/blog/30-days-of-gratitude', '/blog/how-to-use-meditation-to-manage-chronic-pain', '/blog/august-2022-calm-calendar', '/blog/how-to-embrace-uncertainty', '/blog/how-to-meditate-in-bed', '/blog/mindful-eating-journal', '/blog/no-excuses-guide-to-meditation', '/blog/2019-daily-calm-calendar-2', '/blog/-new-thomas-friends-kids-meditations-and-sleep-story', '/blog/workplace-anxiety-guide', '/blog/be-your-valentine', '/blog/year-of-calm', '/blog/walking-meditation', '/blog/how-to-develop-a-meditation-practice', '/blog/the-neuroscience-of-meditation', '/blog/april-2023-calm-calendar', '/blog/introducing-calm-body', '/blog/meditation-for-headache', '/blog/april-2021-calm-calendar', '/blog/how-calm-users-fit-meditation-into-daily-routine', '/blog/happy-international-womans-day', '/blog/courageously-meet-your-life-with-julys-mindful-living-calendar', '/blog/the-10-greatest-bob-ross-quotes-of-all-time', '/blog/the-gift-of-meditation-for-kids-by-mallika-chopra', '/blog/mindfulness-based-stress-reduction', '/blog/april-2022-calm-calendar', '/blog/july-2022-calm-calendar', '/blog/september-2022-calm-calendar', '/blog/5-simple-ways-to-practice-mindfulness-in-daily-life', '/blog/every-workplace-can-have-a-mindfulness-space', '/blog/take-care-of-your-mental-health-with-octobers-mindful-living-calendar', '/blog/august-2023-calm-calendar', '/blog/mindful-eating', '/blog/yearofcalm-deepen-your-awareness-6pp7t', '/blog/a-weeklong-trip-with-jeff-warren', '/blog/what-is-flow-state', '/blog/decembers-upcoming-daily-calm-meditations', '/blog/deep-meditation', '/blog/march-2022-calm-calendar', '/blog/how-to-meditate-in-eleven-steps', '/blog/how-to-change-habits-mindfully', '/blog/june-2021-calm-calendar', '/blog/embrace-the-moment', '/blog/june-2022-calm-calendar', '/blog/the-benefits-of-mindful-eating', '/blog/mental-health-awareness-month-jeff-warren', '/blog/what-to-focus-on-when-meditating', '/blog/dear-2019', '/blog/5-ways-to-improve-your-focus-and-productivity', '/blog/free-resources', '/blog/cultivate-a-sense-of-wonder-this-april', '/blog/2020-daily-calm-calendar', '/blog/inner-peace', '/blog/meditative-state', '/blog/a-month-of-loving-kindness', '/blog/body-scan', '/blog/shift-your-thinking-how-to-handle-a-negative-mind', '/blog/october-2022-calm-calendar', '/blog/november-2021-calm-calendar', '/blog/self-care-holiday-season', '/blog/how-to-start-meditating-daily', '/blog/december-2021-calm-calendar', '/blog/mindfulness-exercises', '/blog/march-2021-calm-calendar', '/blog/announcing-the-daily-trip', '/blog/may-2021-calm-calendar', '/blog/february-2023-calm-calendar', '/blog/dealing-with-grief', '/blog/happiness-does-not-come-from-headstands', '/blog/wandering-mind', '/blog/meditations-for-pain-and-sleep-by-oren-jay-sofer-available-exclusively-in-the-calm-app', '/blog/2021-calm-calendar', '/blog/4-ways-to-soften-loneliness', '/blog/shinzen-young-develops-meditations-for-pain-performance-anxiety-and-daily-life-available-exclusively-in-the-calm-app', '/blog/mindfulness-for-kids', '/blog/my-morning-routine', '/blog/junes-mindful-living-calendar-is-about-nourishing-relationships', '/blog/may-2022-calm-calendar', '/blog/february-2021-calm-calendar', '/blog/may-2023-calm-calendar', '/blog/gratitude-exercises', '/blog/two-things-i-did-wrong-when-i-started-meditating' ]; // Replace with actual URLs // Define the HTML snippets var snippetHTML1 = `
What do you find difficult about sleep?
`; // Replace with actual HTML content var snippetHTML2 = `
How does stress show up for you?
`; // Replace with actual HTML content var snippetHTML3 = `
How often do you meditate?
`; // Replace with actual HTML content // Function to append HTML and add close functionality function appendHtmlAndAddCloseFunctionality(htmlSnippet, targetClass) { var targetElement = document.querySelector(targetClass); if (targetElement) { targetElement.insertAdjacentHTML('beforebegin', htmlSnippet); var closeButton = targetElement.previousElementSibling.querySelector('.quiz-close'); if (closeButton) { closeButton.addEventListener('click', function(event) { event.preventDefault(); targetElement.previousElementSibling.remove(); }); } } } // Append snippet 1 if (allowedUrlsSnippet1.includes(currentPath)) { appendHtmlAndAddCloseFunctionality(snippetHTML1, '.content'); } else if (allowedUrlsSnippet2.includes(currentPath)) { appendHtmlAndAddCloseFunctionality(snippetHTML2, '.content'); } else if (allowedUrlsSnippet3.includes(currentPath)) { appendHtmlAndAddCloseFunctionality(snippetHTML3, '.content'); } else if (currentPath.includes('journey-redirect')) { let meta = document.createElement('meta') meta.name = 'robots' meta.content = 'noindex' document.head.appendChild(meta) return } else { appendHtmlAndAddCloseFunctionality(snippetHTML2, '.content') }}); // Quiz Flow Tracking Codedocument.addEventListener("DOMContentLoaded", function() { // Function to extract a specific part of the URL slug function getSlugPart() { var path = window.location.pathname; // Get the pathname of the URL var slug = path.split('/').pop(); // Split the pathname by '/' and get the last part return slug || 'Unknown'; // Return the slug part or 'Unknown' if it's not available } // Function to set UTM parameters on elements with the class 'quiz-link' function setUTMParameters() { var slugPart = getSlugPart(); // Get the specific part of the slug var quizLinks = document.querySelectorAll('.quiz-link'); // Select all elements with the class 'quiz-link' quizLinks.forEach(function(link) { var originalUrl = link.href; var utmParameters = `utm_source=blog&utm_campaign=${encodeURIComponent(slugPart)}&utm_medium=organic`; // UTM parameters with the slug part var separator = originalUrl.includes('?') ? '&' : '?'; // Determine if we need to start with '?' or append with '&' link.href = `${originalUrl}${separator}${utmParameters}`; // Append UTM parameters to the URL }); } setUTMParameters(); // Execute the function when the page loads});document.addEventListener("DOMContentLoaded", function() { const currentPath = window.location.pathname const allowedUrls = ['/blog/vacation-anxiety'] if (allowedUrls.includes(currentPath)) { // Article cutoff const contentWrapperRow = document.querySelector('.blog-item-content .sqs-row'); const contentWrapperCol = contentWrapperRow.querySelector('.sqs-col-12'); const cutoffBtnHtml = `
` if (contentWrapperRow && contentWrapperCol) { contentWrapperCol.classList.add('cutoff') contentWrapperRow.insertAdjacentHTML('beforeend', cutoffBtnHtml); const cutoffBtn = contentWrapperRow.querySelector('.cutoff__btn__btn'); cutoffBtn.addEventListener('click', () => { contentWrapperCol.classList.remove('cutoff') cutoffBtn.parentElement.remove() }) } // Paragraphs read const paras = document.querySelectorAll('.blog-item-content p'); const pFirst = paras[0] const pMiddle = paras[Math.round(paras.length / 2)] const pLast = paras[paras.length - 2] const paragraphEventStops = { first: false, middle: false, last: false } function throttle(fn, wait) { var time = Date.now(); return function() { if ((time + wait - Date.now()) < 0) { fn(); time = Date.now(); } } } function isInViewport(element, order) { var bounding = element.getBoundingClientRect(); if ( bounding.top >= 0 && bounding.left >= 0 && bounding.right <= (window.innerWidth || document.documentElement.clientWidth) && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && !paragraphEventStops[order] ) { paragraphEventStops[order] = true return true; } } const sendEvents = order => { dataLayer.push({'event': `${order}_paragraph`}) if (typeof amplitude !== 'undefined') { let eventProperties = { page_name: currentPath, calm_user_id: null } amplitude.track(`Blog : Article Scroll : ${capitalizeFirstLetter(order)} Paragraph`, eventProperties); } else { console.log('Failed to load Amplitude API :/'); } } const checkParaSendEvent = () => { if (isInViewport(pFirst, 'first')) sendEvents('first'); if (isInViewport(pMiddle, 'middle')) sendEvents('middle'); if (isInViewport(pLast, 'last')) sendEvents('last'); } const capitalizeFirstLetter = (string) => { return string.charAt(0).toUpperCase() + string.slice(1); } window.addEventListener('scroll', throttle(checkParaSendEvent, 150)) }})
nervous systemFeatured
Calm Editorial Team