-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refreshing on AJAX pages #120
Comments
I have also tried with this code: `
|
I am running a test on this page http://derekcoleman.me/pzzb6/ |
I have added this code to refresh the ad whenever the URL changes and it helps it work for the first 'page' change but then it doesn't refresh the ad once it's on the new URL.
|
Your example page seems to be stuck in some kind of loop... its calling it repeatedly over and over 10 times per second at least... |
This jquery mobile test I put together a while back seems to have the same kind of idea... and the same issue with ads not showing up after a while... from what I can see though everything is loading correctly... it just appears to be google limiting the amount of times a creative will appear on a single page within a certain amount of time... if you have more creatives it will be fine I think. |
I removed the last bit of code that was checking if the URL has changed so now I have the same exact code as what is on the demo page but it's not working correctly. It is still having the same problem of not working once I navigated to a new 'page'. Derek Riccardo Coleman
This jquery mobile test I put together a while back seems to have the same kind of idea... and the same issue with ads not showing up after a while... from what I can see though everything is loading correctly... it just appears to be google limiting the amount of times a creative will appear on a single page within a certain amount of time... if you have more creatives it will be fine I think.http://coop182.github.io/jquery.dfp.js/dfptests/demo1.html— |
@derekcoleman i had the similar problem and solved it by implementing it like this first example: take notice of the |
@samburgers could you please explain for someone who's not that code savvy how you did it? :) |
@boooooooorbs You will need to use some of Google's native methods in jquery.dfp.js beforeEachAdLoaded callback like such:
|
I can't seem to get ads refreshing every 30 seconds and working for ajax pages. I have the ads refreshing but it currently doesn't work once I change pages two or more times. This is what my code looks like right now.
$('.adunit:not(".display-block")').dfp({ dfpID: '52137663', enableSingleRequest: false, afterAllAdsLoaded: function() { setInterval(function() { jQuery.dfp(); }, '30000'); } });
The text was updated successfully, but these errors were encountered: