New York CNN Business  — 

McDonald’s and Wendy’s are both giving away free fries this week.

On Wednesday, in celebration of the (apparently real) National French Fry Day, McDonald’s will give away free orders of large fries — with no purchase necessary. However, the free fries can only be ordered through the McDonald’s app, and customers must be members of the chain’s loyalty program.

Similarly, Wendy’s on Monday announced the beginning of Fry Week, during which the chain is offering free fries with specific purchases that will change each day this week. For example, on Tuesday Wendy’s customers can get free medium fries with any salad purchase.

Like McDonald’s, Wendy’s recently reformulated fries are only free if ordered through its app and customers have to be part of the brand’s digital loyalty program.

Ultimately the goal for McDonald’s, Wendy’s and other chains with loyalty programs is to increase sales and lure in customers — ideally on a daily basis — by offering reasons to choose them over their competitors. The programs also give restaurant owners access to customers’ data and ordering habits that help target diners with customized deals.

McDonald’s (MCD) program has surpassed 26 million members since its launch a year ago as one of several important digital initiatives for the company.

“We’re also seeing more frequent visits from loyalty customers, many of whom were very loyal to begin with,” said McDonald’s CFO Kevin Ozan in a recent earnings call. “Some of our largest markets have seen record customer visit frequency driven by loyalty usage coupled with app exclusive promotions.”

As for Wendy’s, whose program had about 19 million members as of the end of last year, the company said on a recent earnings call that it is “really pleased” with the two-year old program because enrolled customers come in more frequently.

“It helps speed up the drive-thru, helps drive order accuracy, helps with quickness of payment and then ultimately provides a lot of benefit for us over time as we get all that information to better connect to our consumer on a one-to-one basis,” said Wendy’s CEO Todd Penegor on the call.