From the electoral map, I see that Harper's party was primarily successful in Alberta, Saskatchewan and Manitoba, as well as in a number of rural districts in B.C. and Ontario. The Conservatives had no success whatsoever in Atlantic Canada and in the great metropolitan centers outside of the three prairie provinces.
While the NYT lists the major campaign issues as follows:
The focus of the campaign fluttered among issues, including a scandal over Conservative senators’ expenses; antiterrorism measures Mr. Harper introduced; pensions; the stagnation of the economy brought about by plunging oil prices; the government’s handling of refugees; the Trans-Pacific Partnership trade pact; and Mr. Harper’s attempts to ban the wearing of face veils known as niqabs during citizenship ceremonies.
it is apparent from Trudeau's surge of popularity beginning on October 4 that public opinion moved in favor of the Liberals over the Conservatives' timid response to the Syrian refugee crisis, their opposition to a Supreme Court decision on the right to wear the niqab in public ceremonies, and the general perception that Harper and his party were using "Muslim-bashing" to stay in power.