Questions continue to swirl around the viability of businesses built around widgets. Sure, there are hundreds of millions of people who interact widgets on social networks and other sites, but how can you make money on all that engagement?

Clearspring is working hard to answer that question — and it has just raised $18 million round led by New Enterprise Associates to help it do so. The McLean, Va.-based company provides widget infrastructure: A “platform”, as the company says, that includes widget creation, hosting, distribution, tracking and monetization services for widget creators of all types.

The company claims it is serving and tracking more than four billion widgets a month. It is the largest “widget platform” company in the world, according to Comscore, with 126 million unique widget viewers in March. Competitors include Widgetbox and Musestorm — and many companies, like Gigya, also provide widget hosting and tracking services.

Clearspring has gained its market position in part through cutting deals with all manner of media companies, including NBC, Turner and Disney. Disney-owned ESPN, for example, has found success letting users embed sports scores and other information from the broadcaster’s homepage within social network profiles and pages across the web.

Last December, Clearspring also rolled out a way for big media companies to create advertising widgets — which it is making undisclosed but “substantial amount of revenue,” according to company chief executive and co-founder Hooman Radfar. Clearspring gets a cut of revenue from the widgets it operates that include advertising, and it also gets a cut of development fees from companies that want to have it create or modify widgets for them.

Note: EMarketer recently downgraded its predictions for social networking ad revenue, including revenue from widgets. Radfar says (as I have) that these predictions — while useful — rely on rapidly changing numbers. For example, if Slide or RockYou were to beef up their sales forces more than expected and really go to town selling widget ads to Madison Avenue, revenue would go way up.

The bigger picture

While not all of these widget ad campaigns end up working, some do, especially entertainment-focused ones. Radfar says that widgets for Cloverfield, Kung Fu Panda and most recently the new Indiana Jones movie are doing well.

Perhaps more significantly, the company is refining its analytics services. It tracks widget performance as well as ad performance widgets, and drops cookies — snippets of code in a web browser that record user data — to track users’ content preferences and behaviors.

The company will use this data to make recommendations about what kind of widgets to build and what kind of content to include for specific audiences. For example, Radfar tells me, widgets that contain ads for movies tend to get shared more heavily on Fridays. Possibly because that’s when movies open.

All good widget and social network application companies are very data driven; Slide, RockYou and many other consumer-facing companies also brag about their analytical abilities giving them an edge over competitors.

Clearspring, though, has big goals for itself. The largest players in social networking — MySpace, Facebook and Google — have all introduced ways for users to share data from within social networks on other sites, through widgets or other cross site integration.

Clearspring, Radfar tells me, wants to help give users a seamless experience for using services and viewing content across the web. Facebook has recently introduced a chat feature, for example, that lets you chat with Facebook friends within its site. Facebook is also working on a way to chat with Facebook friends while within other sites, using third-party applications. As the social networks give more access to the user data they contain, Clearspring wants to be a guide. It wants to offer its data analysis services to help companies understand users and figure out meaningful ways of integrating user data across the web, desktop applications and mobile devices.

Previous investors who participated in this round include Novak Biddle Venture Partners and others. The company raised $8 million in venture funding before this round.