A Data Science Central Community
Generally the traffic when a page from site B is displayed in site A's frame, it is counted as a page view for site B and not for A. When the page for site B is rendered in the frame, it is providing the java script that gets executed. So whatever tagging script site B is using, that will determine where the hit is recorded. If traditional logs are being used for tracking, the request for the page in the frame is made to site B so it gets recorded there.
This can be a problem. The content delivered in the frame is a part of the user experience for site A. If I'm trying to understand how users experience site A, activity on site B within A's frame is a black hole. Frames frequently contain specialized processes or forms, possibly including my conversion form, but I have no visability into what the user is doing once they're in that frame.
Sometimes you can partner B so that they can create script to send a hit to your site, but as a part of that you would have to figure out a way to handle continuity of visitor identification.