{"id":20766770,"url":"https://github.com/chapter-three/dfp","last_synced_at":"2026-04-26T02:31:06.439Z","repository":{"id":144983638,"uuid":"49504437","full_name":"chapter-three/dfp","owner":"chapter-three","description":"DFP port to Drupal 8","archived":false,"fork":false,"pushed_at":"2016-01-24T22:24:32.000Z","size":1130,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"8.x-1.x","last_synced_at":"2025-12-26T13:10:23.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chapter-three.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-12T14:16:29.000Z","updated_at":"2017-11-27T15:53:21.000Z","dependencies_parsed_at":"2023-04-19T20:17:12.216Z","dependency_job_id":null,"html_url":"https://github.com/chapter-three/dfp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chapter-three/dfp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdfp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdfp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdfp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdfp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chapter-three","download_url":"https://codeload.github.com/chapter-three/dfp/tar.gz/refs/heads/8.x-1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chapter-three%2Fdfp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32284333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"online","status_checked_at":"2026-04-26T02:00:05.962Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T11:26:01.509Z","updated_at":"2026-04-26T02:31:06.423Z","avatar_url":"https://github.com/chapter-three.png","language":"PHP","readme":"\nDFP Module Ad Tagging (GPT)\n=================================\n\nThe [DFP](http://www.google.com) DFP Module is very similar to the DART Module but uses more JavaScript and is more developer friendly. \n\nTo activate the DFP module: \n\n1. Click the **Modules** menu.  \n\n  The **Module** page appears.  \n\n2. From the left pane, click **Advertising**.  \n\n  A list of advertising modules appears. \n\n3. Check the **Double Click for Publishers** box.  \n\n4. Click the **Save Configuration** button at the bottom of the left pane.  \n\nOpen the DFP Module\n---------------\nTo open the DFP Module: \n\n1. From the **Structure** menu, select **DFP Ad Tags**, **Global DFP Settings**.  \n\n    The DFP Module appears with three tabs: \n\n  - **Global DFP Settings**\n\n  - **DFP Test Settings**\n\n  - **List**\n\n  The **Global DFP Settings** tab is open by default.  \n\nEnter Global DFP Settings\n---------------\n\nThe Global Enter Global DFP Settings contains six sections:\n\n - **Global Tag Settings** \n\n - **Global Display Options**\n\n - **Global Targeting**\n\n - **Ad Test Settings**\n\n - **Inject Javascript**\n\nEnter Global Tag Settings \n---------------\n\nTo enter Global Tag Settings: \n\n1.  In the **Network ID** field, enter the **ID** provided by Ad Ops or Google. \n\n2.  In the **Default Ad Unit Pattern**, enter up to five levels of hierarchy the site will use when no other hierarchy is found.  \n\n  Typically [tokens](#IncludeTokens) are used. \n\n  _**Note: The DFP Click URLs field helps provide analytics for advertising clients.  However, NBC does not use it. **_\n\n3.  Check the **Render Ads Asynchronously** box to load page content without waiting for ads to load.\n\n4. Check the **Disable initial load** box to stop the initial retrieval of ads from Google when the page first loads.  \n\n  This setting can be useful if you want an ad to display only when a user takes action on the page, such as clicking Next in a photo gallery.  \n\n\u003cimg src=\"docs/images/global_tag_settings.png\" width=\"1307\" height=\"1078\"\u003e\n\n5.  Check the **Combine all ad requests into a single request** box to speed your page load.  \n\n6.  Check the Enable **DFP Ad Categories** box to have ad categories entered by others to be redirected to Ad Categories that you have set and check the boxes for the categories you want to use.  \n\n  _**Note: You may receive editorial requests that do not correspond to the categories of ads being sold.  For example, an editorial request might ask for the color *red*, when a category called *warm colors* is actually for sale.  Enable **DFP Ad Categories** to redirect requests to the appropriate category. **_\n\nEnter Global Display Options\n---------------\n\nTo enter Global Display Options: \n\n1.  On the left pane, click **Global Display Options**.  \n\n2.  In the **Global Slug** field, enter the text required to appear above your ad, such as **Advertisement**.  \n\n  _**Note: To leave the slug blank, enter \u003cnone\u003e.**_\n \n3.  In the **Collapse empty divs** section, click the appropriate radio button to specify what the site should do when no ad is loaded in a block:\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e**To**: \u003c/td\u003e\n    \u003ctd\u003e**Click**:\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eLeave a blank block\u003c/td\u003e\n    \u003ctd\u003e **Never** \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e Have blocks expanded by default \u003c/td\u003e\n    \u003ctd\u003e **Collapse only if no ad is served** \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e Have blocks collapsed by default \u003c/td\u003e\n    \u003ctd\u003e **Expand only if an ad is served** \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n4. Check the **Hide slug if no ad is served (recommended)** box to leave the slug blank for any ad that does not load.  \n\nEnter Global Targeting \n---------------\n\nTo enter Global Targeting: \n\n1.  On the left pane, click **Global Targeting**.  \n\n2.  In the **Key** field, enter a category such as **color**.  \n\n3.  In the **Value** field, enter a member of that category, such as **green**.  \n\n\u003ca name=\"IncludeTokens\"\u003eInclude Tokens \u003c/a\u003e\n---------------\n\nTo add tokens: \n\n1. Place your cursor in the field to which you want to add tokens.  \n\n2. Click the **Browse Available Tokens** link.  \n\n  A list of available token types appears.  \n\n3.  Click the arrow next to the required token type.  \n\n  A list of token hyperlinks appears. \n\n\u003cimg src=\"docs/images/available_tokens_2.png\" width=\"705\" height=\"550\"\u003e\n\n4. Click on the token hyperlink.  \n\n  The token appears in the field in which you last placed your cursor. \n\n  You can enter whatever key and whatever value you want.   \n\n  The key | value pair appears in the html code of your site.  \n\n  _**Note: The key | value pairs appear in the html code of your site as a \u003cscript type src= setting, separated by semicolons. **_\n\nEnter Ad Test Settings \n---------------\n\nTo enter Ad Test Settings: \n\n1.  On the left pane, click **Ad Test Settings**.  \n\n  The Ad Test Settings section appears. \n\n  You can use the settings in this section to create a test page in which all of the ads for a particular campaign are trafficked to a test page that the client can view.  When you enter the **?adtest=true query** string to any url of your site, the new prefix, site, and zone you specify on this page replaces the prefix, site, and zone of your URL to create this test page.  \n\nTo view this page, add **?adtest=true query** to the URL in your browser.  \n\nYou can also add [tokens](#IncludeTokens). \n\nInject Javascript \n---------------\n\nTo inject Javascript: \n\n1.  On the left pane, click **Inject JavaScript**.  \n\n  The **Inject JavaScript** screen appears.  \n\n2. In the **Inject JavaScript** field, enter any JavaScript that the page needs to work. \n\n3. Click the **Save configuration** button. \n\nComplete the List Tab\n---------------\n\nThe **List** tab enables you to enter settings for individual ad tags.  It appears with the following sections: \n\n  -**Tag Settings**\n\n  - **Display Options**\n\n  - **Targeting Ad**\n\n  - **Backfill Ad Settings**\n\nTo enter Tag Settings: \n\n1.  Click **List**.  \n\n  The **List** tab appears.  \n\n2. Click the **Add** link.  \n\n  The **Tag settings** screen appears.  \n\n\u003cimg src=\"docs/images/list_tab_add_new.png\" width=\"1351\" height=\"843\"\u003e\n\n3. In the **Ad Slot Name** field, enter a human-readable name, such as **Top Banner**.\n\n4. In the **Sizes** field, enter the dimensions of your ad, such as **300x600**. \n\n5. In the **Ad Unit Pattern** field, enter five levels of content hierarchy for this individual ad slot, separated by slashes, such as: **sports/baseball/Major Leagues/National League/Phillies**.\n\n  *You can also add [tokens](#IncludeTokens).*\n\nEnter Display Options\n---------------\n\nTo enter Display Options: \n\n1. On the left pane, click **Display Options**.  \n\n2.  In the **Slug** field, enter the text required to appear above your ad, such as **Advertisement**.  \n\n  _**Note: To leave the slug blank, enter \u003cnone\u003e.**_\n\n3.  Check the **Create a block for this ad tag** box to create a structured block.  \n\n  This creates a Drupal block that makes it easy to place an ad tag in the correct place.  The block appears on your list of **Blocks** page (**Structure=\u003eBlock**.)\n\n4.  Check the **Render this tag without JavaScript** box if the ad is to appear in email only. \n\nEnter Targeting \n---------------\n\nTo enter Global Targeting: \n\n1.  On the left pane, click **Global Targeting**.  \n\n2.  In the **Key** field, enter a category such as **day part**.  \n\n3.  In the **Value** field, enter a member of that category, such as **prime time**.  \n\n\u003cimg src=\"docs/images/dfp_target_individual.png\" width=\"1316\" height=\"267\"\u003e\n\n_**You can also add [tokens](#IncludeTokens).**_\n\nYou can enter whatever key and whatever value you want.   \n\nThe key | value pair appears in the html code of your site.  \n\nBackfill Ad Settings\n---------------\n\nIf your ad inventory runs out and you need to fill ad space for a time, you can use Adsense to generate relevant ads for your pages.   \n\nTo use Adsense ads: \n\n1.  From the **Adsense Ad Type** dropdown select: **Both image and text ads**, **Only image ads**, **Only text ads**\n1. Click the **Save** button.  \n\n**Note**: You can use the Exportable Scheduler Module to schedule when an ad tag shows up if there is no ad available.   This enables you to avoid charges from Google for having ad tags on your page.\n\nTo enable the Exportable Scheduler Module:\n\n1.  Click the Modules menu. \n1.  Click Advertising. \n1.  Check the Exportable Scheduler Modle box. \n1.  Click the Save configuration button. **_ \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchapter-three%2Fdfp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchapter-three%2Fdfp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchapter-three%2Fdfp/lists"}