TORONTO -- Banks are at risk of being pushed to the sidelines in the age of social media and big data, Royal Bank of Canada's chief executive David McKay said Friday.

Customers are increasingly leaving a digital trail of their financial plans on social media or search histories, such as buying a house, allowing technology giants to not only capitalize on that information, but potentially get into banking themselves, McKay said.

"As these technology players realize their digital dividend there is a risk that our visibility with clients will diminish in the networked economies -- or ecosystems -- of the future," he told shareholders at RBC's annual meeting on Friday.

Technology continues to reshape the financial services landscape as more consumers do their banking online or via smartphone rather than in physical branches. McKay said Friday that mobile is now RBC's number one digital channel, with 3.4 million active users, up 19 per cent over the last year.

In turn, Canada's biggest banks have been investing heavily in technological innovation to stay ahead of the curve. During the last fiscal year, RBC spent more than $3-billion on technology, including on digital initiatives, cybersecurity and artificial intelligence.

And while smaller financial technology companies are both partnering with and competing with traditional banks, larger tech companies and their deep pockets present a more formidable threat.

Last month, for example, it emerged that Amazon was in talks with two large U.S. banks to start offering a chequing-like product to the e-commerce titan's customers, according to the Wall Street Journal.

McKay said there is a risk that these companies in search, e-commerce or social may be the first to deduce what customers' needs are and direct them to financial institutions willing to pay for that information, but also get into banking themselves.

"We think about somebody getting between you and your customer with that information, and start influencing the customer to choose other providers."

He added that RBC, Canada's largest bank, has identified a number of digital "ecosystems" where its clients live and work within which the bank believes it can play an "integral role in the future."

McKay pointed to RBC's recently released Drive app, which allows users to store car-related information, track trips and book service appointments.

"We're preparing ourselves for a world where others can see what you are trying to do before we see it," he told reporters. "So we have a number of strategies to make sure that we stay connected to our customers. So we understand what's going on and we can be relevant."

RBC is also investing heavily in artificial intelligence, and now has more than 200 data scientists working across the bank.

While data allows RBC and other companies to develop more relevant products and refine its approach to customers, it is important to balance this with transparency, McKay said.

The recent revelations that the Facebook data of millions of users was improperly shared with political consultancy Cambridge Analytica, among other things, has prompted a "healthy dialogue" about how personal information should be handled.

He said regulations may be needed to set the boundaries, but hoped that would not be necessary.

"We're poised for a societal discussion on how we're going to use personal information... The way I think that we have acted in the past, globally, as government, industries, whatever it happens to be, may not be sufficient to meet societal norms going forward."