This time of year you probably spend more time shopping than usual. How are you doing with sticking to your budget and only purchasing items you planned to buy? If your answer is pretty terrible, don't feel too bad -- research shows that a full half of consumer spending is unplanned.

It's not just that humans somehow find it naturally difficult to resist shiny baubles and strategically placed candy. It's also that stores actively try to lead you from the path of budgetary restraint using a psychological trick known as the Gruen effect.

Large retailers devote huge amounts of time and resources to exploiting this psychological principle, so if you're a shopper, knowing a little bit about how it works can help you rein in your impulse spending. And if you're a small business without massive data, design, and marketing departments to draw on, you can also use the basic idea to sell more stuff.

You can thank this guy for all your dumbest impulse buys.

As architecture website 99% Invisible explains, the story of the Gruen effect started in Vienna in the early decades of the 20th century, when a young architect-to-be, Viktor Gruen, wandered the cafes and squares. He loved the sense of collective life in his home city, so when he eventually moved to America, he aimed to recreate this communal hustle and bustle there.

His solution was the mall, the first of which was built according to Gruen's design in Edina, Minnesota, in the 1950s. The rest -- including the mall's inexorable rise and current fall -- is history. Even Gruen himself eventually admitted that malls never became community-enriching spaces, but while his idea didn't end suburban isolation, it did get people to buy lots and lots of stuff.

How his design managed this is now known as the Gruen effect, and the idea is still very much alive despite the mall's decline. Gruen noted that if you bamboozle shoppers with sensation -- colors, lights, textures -- when they enter a store, their mindset changes. Their carefully crafted shopping lists fall by the wayside and they shift from thinking of shopping as a means to an end (e.g. picking up a present for dad) to thinking of it as an experience to be savored. In the latter frame of mind, we end up leaving the store with way more items than we planned.

As this Vox video explains, Ikea is the modern master of the Gruen effect, shepherding shoppers through a long, winding route that puts them into contact with more enticingly displayed products, seducing them with Swedish meatballs, and using lighting to lead consumers toward highlighted products.

The Gruen effect: Fight it or exploit it

All of these strategies are well known to big retailers (in the video, Richard La Graauw, the creative director of Ikea USA, gamely shares his secrets), but it pays for consumers and entrepreneurs to know about the Gruen effect too, either to resist or exploit it.

Simply knowing how stores manipulate shoppers can help you resist their charms, by taking simple measures that include refusing to follow racetrack layouts, arming yourself with an ironclad list, and avoiding mixing shopping with activities like eating or drinking that might turn a trip to the store into a lingering experience (unless you've decided ahead that's what you're aiming for, of course).

Meanwhile, retailers way smaller than Ikea can use the same principle to encourage shoppers to spend more. Is your store, whether online or in the real world, a sensory experience to be savored? Are there ways you could tweak your lighting or layout to draw visitors into interacting with more of your products? Could you lull them into staying for a cup of coffee? In general, can you make shopping less of a chore and more of an experience?

Gruen "wanted to build experiences," writes Highrise CEO Nathan Kontny in a post applying the Gruen effect to, of all things, apps. "That's an incredibly powerful lesson as we struggle to get people to buy things from us. Are you just selling another app, another tool, or are you bringing people an experience they crave and can't get anywhere else?"