The agency won the business after a pitch against undisclosed agencies that was called in March.
EHS 4D will now work on a number of customer relationship marketing and eCRM projects that will aim to attract and retain interest in the BBC's portfolio of websites and other online offerings, such as its iPlayer service.
The BBC now has access to a greater range of data thanks to the growth in video-on-demand via iPlayer and digital television. EHS 4D will be responsible for identifying new ways that the corporation can use this data to produce better-targeted messages and content.
EHS 4D already works with a number of major brands on its loyalty and customer retention programmes, including Tesco, easyJet and Comparethemarket.com.
News of EHS 4D's appointment coincides with reports that the BBC is holding a pitch for its £20 million advertising business. Pitches for the account, which is held by Rainey Kelly Campbell Roalfe/Y&R and Fallon, are due to take place in June or July.