Infinite Scroll Pages
The implementation below can be used on infinite scroll pages where additional content is added as the user scrolls.
Insert the Sovrn header script and ad unit divs that will be present on initial page load
Re-insert ad unit divs onto the new page when user scroll initiates a new page load
Update the page URL (if needed)
Call the function
properInfNewPage();
Note: If a new page view should not be counted, or if any ads are inserted after properInfNewPage();
is called, the function properBuildSlots();
can be called to build new slots without counting a new pageview or refreshing existing slots.
Detailed Function Descriptions
properInfNewPage();
- Refreshes the auction, counts a new page view, displays ads on the new page
properBuildSlots();
- Allows the ad-project code to know that the layout of the page has changed. Runs a check to see if more slots have been added, or if they need to be dynamically added by the ad-project code. This function doesn't refresh the current slots on the page, but it will build and display new slots. This function won't record a new page view.
Need More Help?
If you still have questions, please reach out to admanagement@sovrn.com