Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ronreiter
Gruvian Integration
This PR fully integrates with Gruvian. Gruvian is a native advertising marketplace that enables publishers to have complete control over the structure and style of their ads, all backed by the same realtime auction technology that powers the largest ad exchanges.
Key Changes
The ads fetched on the server with the
get_gruvian_ad()
function. This makes a post request to the Gruvian API to run an auction and get the resulting ad (if the auction is filled).This ad object is then passed into the
render_template
function. Only pages that don't have an existing DataCamp affiliate link.Then, the ad is rendered in
index.html
in place of the Coding For Kids ad. If the Gruvian auction is not filled, then the Coding for Kids ad is served instead.The Gruvian ad is an image that goes in the "Sponsors" column of the page.
This also adds a "Sponsor this Site" button directing interested sponsors to the preview page of this site on Gruvian.
Required Changes
The Gruvian api key needs to be set to the environment variable
GRUVIAN_API_KEY