What if your telecom company tracked the websites you visit, the apps you use, the TV shows you watch, the stores you shop at and the restaurants you eat at, and then sold that information to advertisers?

In theory, it’s possible, given the stance Washington is taking on online privacy.

Lawmakers on Tuesday voted to overturn privacy rules that required telecom companies to get customers’ permission before sharing their web-browsing and app usage history with third parties. The White House said Wednesday President Donald Trump intends to sign the measure into law.

Undoing the rules, which had been adopted last fall by the Federal Communications Commission but hadn’t gone into effect, is a boon to Verizon Communications Inc., VZ -0.40% Comcast Corp. CMCSA -0.70% and AT&T Inc., T -0.48% which are all in the process of building data-driven digital ad businesses to complement the broadband, wireless and TV services they offer.

The telecom providers had argued the rules put them at a competitive disadvantage to online ad giants Google and Facebook, which generally aren’t regulated by the FCC.

Google and Facebook have built huge businesses powered by reams of data they collect about consumers’ online actions, both on their own properties and across the web. That trove of information largely explains their dominance -- combined, they have a roughly 47% share of the global digital ad market, according to eMarketer.

More House Approves Bill to Overturn FCC Privacy Rule (March 28)

But online advertising executives say telecom providers potentially have access to more powerful data than the two tech powerhouses. Their networks -- both wired and wireless -- could give them a window into nearly everything a user is doing on the web.

“ISPs like Verizon can now start building and selling profiles about consumers that include their friends, the news articles they read, where they shop, where they bank, along with their physical location,” said Jason Kint, chief executive of digital media trade body Digital Content Next and a vocal proponent of the rules that Congress voted to repeal.

Daily Newsletter Get your daily dose of media and advertising news with WSJ’s CMO Today newsletter. Sign up here.

Though the FCC rules never went into effect, the measure Congress has approved would give telecom companies far more comfort that they can construct detailed profiles of their customers’ behaviors and tastes and share that information with marketers without being punished by regulators.

For example, a wireless provider might track which websites and apps a consumer uses, in addition to their location, and use that information to help determine which products they’re likely to purchase.

If a consumer uses the same telecom provider for wireless, broadband and TV service, the provider could, in theory, track the majority of that consumer’s online behavior and media consumption.

Now, just because telecom operators won’t be shackled doesn’t mean they’ll gather and sell every bit of information they have access to. Consumers who already find targeted ads creepy -- like the kind from retailers that follow you around after you’ve visited their site -- might not take kindly to their telecom company tracking their every move.

“They could conceivably sell to the highest bidder someone’s browsing history, but it’s not clear that that would fly as a business model,” said Kevin Werbach, a professor at the University of Pennsylvania’s Wharton School.

In January, major ISPs agreed to abide by a set of voluntary privacy principles which stated they will give broadband customers “opt-in consent for the use and sharing of sensitive information as defined by the FTC”, and “a clear, comprehensible, accurate, and continuously available privacy notice that describes the customer information we collect, how we will use that information, and when we will share that information with third parties.”

Jonathan Spalter, chief executive of USTelecom, a trade body representing broadband service providers, said in a statement that Congress’s action “is another step to remove unnecessary rules and regulations that handicap economic growth and innovation, and moves the country one step closer to ensuring that consumers’ private information is protected uniformly across the entire internet ecosystem.”

Consumers who are unhappy with how broadband companies collect data have few options if they want to switch providers.

“Internet service providers are a distinctly severe threat to consumer privacy because we have little choice about whether to use them or not,” said Peter Eckersley, chief computer scientist at privacy advocacy group, Electronic Frontier Foundation. “If you’re in a small American town with only one ISP you have literally no choice but to use it.”

Verizon acquired AOL for $4.4 billion in June 2015 and AOL’s chief executive has pitched marketers on the idea of using Verizon’s data and AOL’s technology to help show highly-targeted ads to consumers. One idea, for example, is to use location data to test the effectiveness of ads -- determining how many people who saw an ad for, say, a hotel, subsequently went to that hotel.

In an emailed statement, a Verizon spokesman said “Verizon is fully committed to the privacy of its customers. Any elimination of the current FCC privacy rules will not change that commitment.”

For its part, AT&T has suggested its proposed $85.4 billion acquisition of Time Warner Inc. could result in its data being used to help target TV advertising, offering competition to Google and Facebook as a result.

AT&T’s defunct Internet Preferences program collected web-browsing data from some home broadband customers and charged subscribers who wished to opt out of collection an additional $29 a month. But the carrier said in September it was ending both the data-gathering and the fee levied to avoid it.

AT&T declined to comment.

—Drew FitzGerald contributed to this article.

Write to Jack Marshall at Jack.Marshall@wsj.com