Pugpig Site: Google Publisher Tag and Google Ad Manager
Pugpig Site supports certain aspects of the Google advertising suite.
High Level Approach
The JavaScript is included on the page - an example tag is shown below.
We include divs for the units inside the HTML templates:
<div id="div-gpt-ad-side-1"></div>
These are then targeted in Javascript with something like this:
googletag.defineSlot('/22758755668/ACME', [[970, 90], [728, 90]], 'div-gpt-ad-side-1').addService(googletag.pubads()));
Ad Targeting Tags
Technical Approach
We will pass all relevant taxonomy terms for targeting:
googletag.pubads().setTargeting('section', 'Tax');
Note: The first value is the slug of the taxonomy, while the second is the name of the term.
You can see all the values we will pass in the source of the page as pugpig:tag meta tags, for example:
<meta name="tag" property="pugpig:tag" content="section-Tax"/>
Tags Used
We determine the tags to send as follows:
Content Type | Example | Tags |
---|---|---|
WordPress Pages |
/ /cricket Normally your home page, manually curated section pages, furniture pages (e.g. subscribe/about us/etc) |
We will send the terms that are associated with the pages. These are normally added manually in the CMS. |
WordPress Posts |
/2022/09/01/my-article.html Any articles |
We will send all of the terms for all of the taxonomies of the post. Note that articles could have multiple terms (for example, topic could be News and Sport), in which case we send an array. |
WordPress Taxonomy Pages |
/section/tax/ These are automatically created section pages based off a specific taxonomy page |
We will send only the taxonomy that drives the page |
Post Grid Plugin | Blocks of articles in a grid on a page | If you need to show adverts inside a post grid, please get in touch |