The campaigns also use microtargeting to determine the placement of display ads, the small boxes that appear on websites and follow users around as they browse the Internet.
The campaigns might choose specific sites that are likely to attract voters sympathetic to their candidate. The Romney team might place a display ad on a conservative news website, while Obama might do so on a site popular with college students.
Retargeting, or reaching out to someone who has indicated an interest in a candidate online but has not yet taken an action, is another way campaigns use display ads to reach potential supporters. People who have visited a candidate's website but left the site without signing up or making a contribution might start seeing display ads from the campaign urging them to do so.
Campaigns will also place display ads on websites targeting a voter's interests unrelated to politics, such as nature or sports or cooking.
The video-sharing site YouTube has become a popular site for campaign advertising as more people migrate from watching live television to viewing shows and other videos online. Google, which owns YouTube, receives its largest share of political advertising revenue from YouTube ads, Saliterman said.
A voter who has indicated an interest in a candidate and then views a video on YouTube is likely to see a 15- or 30-second campaign ad, called a pre-roll, pop up. A box will appear after five seconds asking if the person wants to continue viewing the ad. Campaigns only pay for ads the viewer watches through to completion.
Associated Press writer Jack Gillum in Washington and researcher Jennifer Farrar in New York contributed to this report.
Follow Beth Fouhy on Twitter: http://www.twitter.com/bfouhy
Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.