I need help to create an alternative approach (or multiple approaches) to load an ad unit only once certain criteria have been met. On the page below on mobile devices I am using the code I wrote to make this work: [login to view URL]
This approach works, but it is causing problems with the ad network's (Yahoo Gemini) reporting of my count of impressions. For some reason, the ad is appearing on every page view on the live site, but the ad network's impression pixel is only recording 1 impression for every 10 or 11 page views, and I'm not sure what that is the case.
The standard ad code look like this:
begin script
var sectionCode = sectionCode || [];
[login to view URL]("my-ad-unit-ID");
(function(){
var script = [login to view URL]("script");
[login to view URL] = true;
[login to view URL] = "[login to view URL]";
[login to view URL](script);
})();
end script
<div class=gemini-ad-my-ad-unit-ID></div>
This is the approach I'm currently taking to load the ads:
1) On the initial page load I:
a) load the script above as per usual, but I don't include the gemini ad div anywhere on the page
b) I include a div with the class of "target" on the page: <div class="target"></div>
c) I include a div with the class of "in-view-target": <div class="right-column-1 in-view-target">
2) My goal is to load the gemini ad only when the "in-view-target" is in view. I'm using a third party script called [login to view URL] to handle the view detection.
I use the following jQuery code to listen for the in-view-target to become visible and then once it is I use the appendTo function to append the gemini ad div to my "target" div (which is where I want the add to appear):
begin script
jQuery('.in-view-target').bind('inview', function(event, visible) {
if (visible) {
jQuery( "<div class=gemini-ad-aeb5ed8f-9184-4368-a84c-da8c74cad181></div>" ).appendTo( ".target" );
jQuery('.in-view-target').off('inview');
}
});
end script
This approach works but, as I said, it is causing problems with the ad network's impression counting.
I EITHER want to:
a) figure out why my above approach is causing Gemini's count of ad impressions to be so wrong
or
b) find an entirely new way to achieve this. my core requirements are:
1) i want the ad to load in a particular position (where my target div is)
2) i want the ad to load only once the in-view-target div is in view
3) i want to employ an approach that doesn't break the ad network's impression counting (this will require running some live tests to confirm)
It is worth nothing that I'm happy to use an alternative means to detect that the in-view-target is in view or do anything else to make this work. I'm a novice developer so this is simply the result of my hacking.
First, I am sunsoftpro, I from VietNam.
Nice to meet you!
I have read your description and been interested in your project.
I'm ready to discuss and do hard working so that complete great job.
Please discuss requirements and terms before awarding the project.
Dear Client, Greetings from Flowgica technologies,
I have experience with these skills. We do have similar experience doing something similar to yours therefore I am looking forward to discuss and move ahead.
please check our freelancer portfolio at https://www.freelancer.com/u/mmadi.html?page=portfolio
I am ready to work with you,kindly waiting for your response.
Thanks & Regards,
Mmadi
Hello Sir,
We are an Indian development company here.
we have checked your posted details here and want more clarification in it, so message us to discuss on it more then we will able to move on it.
Thanks
Hi there - My name is Yogesh. I’ve read your brief..My team has 4 years experience designing and developing mobile apps and Websites.I would approach your project by starting with wireframes and getting the site completed, before starting the actual development phase. I am highly qualified for this project and would love to speak with you further about taking this project on. If you'd like to view my previous work, take a look at my Freelancer Portfolio.
Regards,
Yogesh
Thanks, Diamond looking forward for your reply.
Respected Client,
We are working on IT stuff since 4+ years added on that we have seen your project detail which meets our criteria & feasible for us. Our senior developer has 5+ years of experience. You'll get the best service from our side, but you must have a question what separate from the rest. Find out here:
(1) Regular Updates in any project
(2) Code Quality Maintenance
(3) Quick Turnaround Time
(4) Flexible Time for working
(5) Can work on weekend (in case necessary)
(6) More than 100+ websites completed
(7) 70% are repeated clients
(8) Most important - SERVICE (6-12 Months of service )
Above all points are not just for approaching you but we mean each & every our point to satisfy client as we believe much in productivity & commitment.
I hope we'll have a chance to have a word with you.
PS: Price is just for the placeholder. Final to be shared later as a proposal gets ready.....