Skip to content
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

Gruvian Integration #803

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mdjorup
Copy link

@mdjorup mdjorup commented Jul 1, 2024

@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

@mdjorup mdjorup force-pushed the integrate-with-gruvian branch from a324d3e to 0c02671 Compare July 1, 2024 15:58
@mdjorup mdjorup marked this pull request as ready for review July 2, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant