Ad packages

Description

Some Frontity users would want to show ads in their sites. It has to be as simple as installing the specific package that integrates with the ad provider of choice (e.g. AdSense, DoubleClick, SmartAds, etc.) and configuring the ads in frontity.settings.js in order to make them appear in a specific slot (see Slot and Fill).

General settings related to a specific ad package would be in the state, under its respective namespace.

Also, any Ad component could be imported from libraries or from the package and rendered in any place.

UserStories

As a Frontity user
I want to install and configure an ad package
so that I can show ads from an specific provider in a site, without coding.

As a Frontity user
I want to create fills (see Slot and Fill) with ad components
so that I can show ads in specific slots of a Frontity theme.

As a Frontity user
I want to create fills (see Slot and Fill) with ad components using assertions
so that I can show ads in specific slots and under certain conditions (e.g. only in posts).

As a Frontity user
I want to import and use an Ad component
so that I can show ads in my own theme wherever I want, without using fills.

Possible solution

Any ad package should expose the Ad component in libraries, under a specific namespace (e.g. adSense.libraries.Ad), or following the rules decided on Slot and Fill.

Apart from that, the implementation of each package would be limited to the specific Ad component and the integration with the ad provider.

Great work :slight_smile:

Do you think it makes sense to open specific Feature Discussions for each of the platforms? Like AdSense, DoubleClick and SmartAds. And document the specific settings needed for each one? Global settings like networkId, publisher-id and so on, individual settings like slotId, format and so on and the scripts and assets needed.

Indeed, I’ll be working on that today.

At first I thought to keep all the ad packages in the same FD, but it makes more sense for our development process to create a FD for each one as they could be implemented separately.

I’m going to close this one. Thanks @david.

For future reference, this are the FD opened by David:

There’s going to be another one for Adsense in the near future.

1 Like