Description
The Google Ad Manager package will allow Frontity to integrate with Google Ad Manager, letting you add fills for ads in frontity.settings.js
in order to make them appear in a specific slot (see Slot and Fill).
Note about naming:
Google Publisher Tag is the name that ad tags (i.e. the HTML code) receive. DoubleClick for Publishers was the name of the service until July 2018, when it was renamed to Google Ad Manager.
-
This package wouldn’t have general settings.
-
Specific ad settings would be defined in each fill.
-
Also, you would be able to get the
GooglePublisherTag
component fromlibraries
and render it in any place.
UserStories
As a Frontity user
I want to install and configure the Google Ad Manager package
so that I can show ads from Google Ad Manager 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 use theGooglePublisherTag
component directly
so that I can show ads from Google Ad Manager in my own theme without using fills.
The next two user stores are going to be developed in a different FD:
As a Frontity user>I want to show ads in SSR>so that a visitor would see ads without having to wait ot React to do the CSR.
As a Frontity user>I want to lazyload ads>so that I can show ads without harming visitors experience.
Possible solution
Initial proposed solution (click to open)
Any ad package should expose the Ad
component in libraries
, under its specific namespace (in this case googleAdManager
), 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.
Ads should work on SSR, so the way to render them should be using the Script
component or something like that. The same for setup tags.
Examples
-
Add an ad above the first post of any archive.
-
Add ads in the middle of a post’s content, below the header, above the footer, etc.
References:
-
Google Publisher Tag - Getting started: https://developers.google.com/doubleclick-gpt/guides/get-started
-
Google Publisher Tag - Reference: https://developers.google.com/doubleclick-gpt/reference
-
Component implementation for the old framework: https://github.com/wp-pwa/wp-pwa/blob/dev-stable/core/packages/ads/shared/components/Ad/DoubleClick/index.js
-
Script implementation for the old framework: https://github.com/wp-pwa/wp-pwa/blob/dev-stable/core/packages/ads/shared/components/Ad/DoubleClick/functions/call.js
-
This was the announcement renaming DoubleClick For Publishers to Google Ad Manager: Introducing Google Ad Manager (July 2018)