In a new report on digital campaigning, released this week, the public sector body said: "The use of social media was first heralded as a positive revolution in the mass engagement of voters."
But it added: "More recently we have seen serious allegations of misinformation, misuse of personal data, and overseas interference. Concerns that our democracy may be under threat have emerged."
It recommended that the law be changed so that online materials produced by parties, candidates and campaigners have an imprint stating who has created them. Such a move, it said, will "help voters to assess the credibility of campaign messages".
The report outlined how campaigners are increasingly using new ways of communicating to reach voters. This includes advertising on platforms such as Facebook, Google, Instagram, Snapchat, Twitter and YouTube.
The report noted: "Advertising is not the only way campaigners communicate with voters on social and digital media. Campaigners can also ‘like’, ‘share’ and ‘post’ messages for free and potentially reach wide audiences."
It recommends that campaigners provide detailed information about how money has been spent on digital campaign activity.
The report stated: "This should include the messages used in those campaigns, which parts of the country they were targeted at, and how much was spent on each campaign."
Social-media companies should label election and referendum ads to make it clear who they are from.
The Government and security services have "said that foreign sources are likely to have tried to disrupt and interfere with UK election and referendum campaigns using digital and social-media tools."
And "academic research has also started to show that foreign sources appear to have carried out some social-media activity in the UK," warned the report.
It added that there should be a "specific ban on any campaign spending from abroad" as this "would further strengthen the UK’s election and referendum rules."
The report also recommended that the commission have greater investigatory powers and be able to impose tougher sanctions.
Sir John Holmes, chair of the Electoral Commission, said: "Implementing our package of recommendations will significantly increase transparency about who is seeking to influence voters online, and the money spent on this at UK elections and referendums."
Research released by the Commission alongside the report stated that, although the public is less trusting of online materials, citing concerns over both the content and source, "people on the whole are unlikely to be aware of the extent to which they may be influenced by digital campaigning material."
It added: "Research participants themselves noted that they would engage with some material even if they didn’t trust the source, if this was entertaining or appeared popular on social media."
Click here to subscribe to the FREE public sector bulletin to receive dedicated public sector news, features and comment straight to your inbox.
Make sure you register for the site to access more than one story per month.
To submit a news, comment, case study or analysis idea for the public sector bulletin, email Ian.Griggs@haymarket.com