Josh Posted December 3, 2017 Report Share Posted December 3, 2017 Revive 4.1 added custom events for refreshing. From release notes: Added custom events to the Javascript Async delivery, allowing the website to better interact with Revive Adserver, e.g. to refresh some ad placements. Any usage examples of how to use? Quote Link to comment Share on other sites More sharing options...
Josh Posted December 4, 2017 Author Report Share Posted December 4, 2017 Usage example for refreshing javascript async invocation tags. Got it working like so HTML <div class="ad-300x250" id="ad-300x250-1"> <ins data-revive-zoneid="153" data-revive-id="b7c2bd3ff3b3bed3a9daa932a43cc2a8"></ins> <script async src="https://ra.example.com/www/delivery/asyncjs.php"></script> </div> <div class="ad-300x250" id="ad-300x250-2"> <ins data-revive-zoneid="154" data-revive-id="b7c2bd3ff3b3bed3a9daa932a43cc2a8"></ins> <script async src="https://ra.example.com/www/delivery/asyncjs.php"></script> </div> JS // placements to refresh var adSlots = ['#ad-300x250-1', '#ad-300x250-2']; // remove data-revive-loaded attribute for (var i = adSlots.length - 1; i >= 0; i--) { $(adSlots).find('ins').removeAttr('data-revive-loaded'); } // refresh the ads (use your data-revive-id) reviveAsync.b7c2bd3ff3b3bed3a9daa932a43cc2a8.refresh(); // if your data-revive-id starts with number, access like so //reviveAsync['7bc2bd3ff3b3bed3a9daa932a43cc2a8'].refresh(); andrewatfornax 1 Quote Link to comment Share on other sites More sharing options...
Nidhi Posted May 31, 2019 Report Share Posted May 31, 2019 What is reviveAsync? I got this error reviveAsync is not defined Quote Link to comment Share on other sites More sharing options...
andrewatfornax Posted June 2, 2019 Report Share Posted June 2, 2019 On 5/31/2019 at 9:03 PM, Nidhi said: What is reviveAsync? I got this error reviveAsync is not defined I would recommend starting a new thread, with some details of your error, what you were doing at the time you got the error, etc. Quote Link to comment Share on other sites More sharing options...
Vladimir Lysenko Posted October 23, 2020 Report Share Posted October 23, 2020 On 5/31/2019 at 1:33 PM, Nidhi said: What is reviveAsync? I got this error reviveAsync is not defined reviveAsync" is window.reviveAsync . replace: On 12/4/2017 at 11:05 PM, Josh said: // refresh the ads (use your data-revive-id) reviveAsync.b7c2bd3ff3b3bed3a9daa932a43cc2a8.refresh(); // if your data-revive-id starts with number, access like so //reviveAsync['7bc2bd3ff3b3bed3a9daa932a43cc2a8'].refresh(); by // refresh the ads (use your data-revive-id)window.reviveAsync.b7c2bd3ff3b3bed3a9daa932a43cc2a8.refresh(); // if your data-revive-id starts with number, access like so//window.reviveAsync['7bc2bd3ff3b3bed3a9daa932a43cc2a8'].refresh(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.