ANAHEIM (CBSLA) — With holiday presents being shipped by the truckload, local law enforcement agencies have stepped up their game against porch pirates.

Some departments have even set up sting operations, including officers with the Anaheim Police Department’s Burglary Division.

READ MORE: Activists Protesting LA County Sheriff's Department Briefly Stopped Traffic, No Arrests Were Made

“When it works, it works great,” Anaheim police Lt. Darrin Lee said. “We’ve caught some really good crooks with it.”

On Thursday, officers placed a bait package at a home that had previously been hit by thieves. Inside the package was an iPhone and a GPS device. The technology allows dispatchers at police headquarters to keep tabs on the package and track its location.

READ MORE: Santa Monica Protestors Fighting Planned Demolition Of Several Historic High School Campus Buildings

“Since it’s in hibernate mode, meaning it has not moved yet, it’s only pinging off of cell towers,” Lee said. “So the device in the bait package is talking to the nearest cell tower that’s there.”

Once the box moves, the tracking device switches from hibernate mode to GPS mode and gives police an update every three seconds — including how fast the package is moving.

“If the dispatcher is saying that the package is moving at 2 miles per hour, the officer can infer that the package is being held by somebody and they’re walking,” Lee said. “If the package is moving at 40 miles per hour, looking at the direction of travel, the officers can kind of understand that the package is in a vehicle.”

MORE NEWS: Tournament Of Roses Foundation And LA County Sheriff's Department Host Drive-Thru Food Giveaway In Pasadena

As of Friday afternoon, the package was still sitting undisturbed on the porch.