OTTAWA -- The economy may have been top of mind for online users going into Thursday's federal leaders' debate, but it was the environment that caught the attention of users on Facebook and Twitter, based on data from the two social networks.

Before the debate began, the stagnating economy and concern about jobs were what Canadians were talking about the most in conversations on Twitter and Facebook, and even in Google searches.

Attention turned to the environment, however, when Prime Minister Stephen Harper was put on the defensive over his environmental record, and NDP Leader Tom Mulcair and Liberal Leader Justin Trudeau were pressed on their positions on oil pipelines.

Twitter traffic spiked during that part of the debate, and the environment jumped to the No. 2 spot in the most-discussed issues on Facebook.

Twitter traffic spiked 39 minutes into the debate. Facebook conversations spiked 37 minutes in. Both coincided with Green party Leader Elizabeth May talking about greenhouse gas emissions in Canada, and Harper's claim that they'd declined on the Conservative watch.

Parties are likely to take a look at the data as they refine social media strategies to identify and target voters.

Google handles thousands of searches per second, and also controls YouTube, where parties have been keen to post attack ads that can be easily shared on social networks.

Facebook has more than 19 million users in Canada, a hefty number that is likely to draw the attention of every camp as they set up candidate pages, reach out to supporters and advertise to the undecided in a bid to win power on Oct. 19.

Twitter, too, could have a glut of votes for parties. Data from the company suggests that three-fifths of the possible 13 million users are undecided.

One sign of the times: the Liberals sponsored the "elxn42" hashtag -- or more precisely Trudeau sponsored it, according to the Twitter website -- and the hashtag for Thursday night's debate, "macdebate," was trending in Canada.

Twitter Canada's head of government partnerships, Steve Ladurantaye, said social media is no longer "a niche thing" for candidates and parties.

"Social media is an integral part of every campaign," Ladurantaye said. "It's a lot harder to ignore now than it used to be and it's actually an integral part of what's happening."

Google searches during the first part of the much-anticipated leaders' debate focused on many of the statements that the leaders themselves were talking about.

Google Canada's Leslie Church said the questions the search giant saw from Canada included, "who does Justin Trudeau consider to be part of the middle class," and "Is the Canada Pension Plan a tax?"

"People are trying to figure out how to interpret what the leaders are saying," Church said.

On Twitter, more than 15,000 users were tweeting about the debate, with half of them being in Ontario, data from Twitter Canada show.

For Google and Twitter, the leader whose name came up the most was Trudeau, the Liberal leader, edging out hen Harper in Twitter mentions, and pulling in twice the number of Google searches than the incumbent Conservative leader. His Twitter handle was used more than any other leader, with May coming in second.

Going into the debate, Harper had topped his opponents in Google searches and mentions on Facebook, and his Twitter account had been mentioned more often than any other leader during the first week of the campaign.

In all three cases, Harper was followed by Trudeau, with Mulcair running third.