The latest television commercials for McDonald’s, featuring the actress Mindy Kaling, do not appear on the company’s YouTube channel, Facebook page or Twitter account. In fact, they don’t mention McDonald’s at all — though they do mention Coca-Cola and Google.

The ads are part of the chain’s first unbranded marketing campaign, in which it is coyly asking people to search Google for “that place where Coke tastes so good.” The query, meant to capitalize on millions of search engine results that favor the fast-food chain, is central to the ads where association with the brand is limited to placing Ms. Kaling in a bright yellow dress against a red backdrop.

The ads, which started running last week, are meant to play on how teens and twentysomethings use their phones while watching TV, while also acknowledging “how they’re discovering information” they trust, said Deborah Wahl, chief marketing officer of McDonald’s for the United States. “They are very influenced by word of mouth and what their peers say,” she said.

Ms. Kaling posted to Twitter on Friday that she recently “partnered with a brand without being able to say the name of the brand,” and jokingly asked to be paid in fries.

McDonald’s use of Google contrasts rather strikingly with a stunt from Burger King last week, when it introduced a TV ad that aimed to prompt voice-activated Google devices into describing its burgers. Google, which was not involved in that campaign, sought to stymie the effort, which many saw as clever but invasive.

The ads with Ms. Kaling, on the other hand, came out of We Are Unlimited, a relatively new creative ad agency that is dedicated to McDonald’s and operates within Omnicom Group, a holding company. Employees of companies including Google, Twitter, Facebook and T Brand Studio (a marketing unit for The New York Times), are among the roughly 200 people who work at Unlimited in Chicago, though Ms. Wahl noted that Google’s participation did not extend to affecting the search results themselves.

“Google didn’t give us any tricks on search or anything,” Ms. Wahl said, adding that gaming the system would have gone against the whole idea of the campaign. “What they’re helping us do is understand if people are really searching as a result of this, and offering close feedback and collaboration in terms of what’s happening with this with real behavior.”

Ms. Wahl said McDonald’s did not pay for any of the Google results that rave about how Coke tastes at its restaurants. A Google search for the phrase at the center of the campaign, which is promoting a $1 soft-drink deal, showed results from relatively obscure blogs on Monday, some of which were written last week, as well as write-ups from websites like Fox News and Thrillist. A YouTube video of one of Ms. Kaling’s commercials also appeared under a channel named “That Place Where Coke Tastes So Good.”

Ms. Wahl said the company is prepared for people to try to interfere with the results, which is by now a hallmark of ad campaigns that involve social media. But, she said, it was anticipating a positive reaction given the conversations about Coke and McDonald’s that were already out there. (Burger King, which relied on the Wikipedia entry for one of its burgers as part of its stunt, saw several mischievous revisions of that page last week.)

The notion that Coke tastes differently at McDonald’s has been a topic of fascination for some time. The New York Times, as part of a 2014 article on the business relationship between McDonald’s and Coke, which dates back to 1955, reported that Coke has a special system for transporting and producing the beverage at the fast-food chain. Part of that includes delivering its syrup in stainless steel tanks versus plastic bags. McDonald’s also says it pre-chills the water and the syrup before it enters its fountain dispensers, and offers a slightly wider straw.

Selecting Ms. Kaling as a pitchwoman for this campaign was also a deliberate choice, Ms. Wahl said, noting that she has been a vocal fan of the brand for years. Indeed, Ms. Kaling wrote in her 2015 book “Why Not Me?” that McDonald’s once sent her a stack of $10 gift cards on her birthday.

“If you follow me on any kind of social media you will see that I’m constantly eating McDonald’s, and not in a campy, skinny-actress way where I go when I’m on my period and ‘being bad!’” she wrote in the book. “I go regularly enough that the woman at the Crescent Heights & Sunset McDonald’s gives me ranch and buffalo sauce packets for my McNuggets without me having to ask.”