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: Three Rushed To Trauma Centers From Five-Vehicle Crash In Costa Mesa

“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: Hot, Dry And Windy: Critical Fire Weather Coming To Southland

“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: Coronavirus Hospitalizations Continue To Rise In Los Angeles County

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