Skip to content

Commit f5fe1e5

Browse files
authored
Merge pull request #191 from Automattic/docs/123-dfp-field-explanations
2 parents 2987feb + 6b49a8b commit f5fe1e5

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

src/UI/class-contextual-help.php

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,47 @@ public function render( WP_Screen $screen ): void {
110110
<?php
111111
$conditionals = ob_get_clean();
112112

113+
ob_start();
114+
?>
115+
<p><?php esc_html_e( 'When using the DFP Async (DoubleClick for Publishers / Google Ad Manager) provider, you need to configure the following fields:', 'ad-code-manager' ); ?></p>
116+
<dl>
117+
<dt><?php esc_html_e( 'Tag', 'ad-code-manager' ); ?></dt>
118+
<dd><?php esc_html_e( 'The ad size/placement type (e.g., 728x90, 300x250). This determines which ad tag definition is used for this ad code.', 'ad-code-manager' ); ?></dd>
119+
120+
<dt><?php esc_html_e( 'Tag ID', 'ad-code-manager' ); ?></dt>
121+
<dd><?php esc_html_e( 'A unique identifier for this specific ad unit placement. This is used as the HTML div ID where the ad will be rendered. Each Tag ID must be unique across all ad codes to prevent conflicts. Example: "homepage-leaderboard" or "sidebar-mpu-1".', 'ad-code-manager' ); ?></dd>
122+
123+
<dt><?php esc_html_e( 'DFP ID', 'ad-code-manager' ); ?></dt>
124+
<dd>
125+
<?php esc_html_e( 'Your Google Ad Manager (formerly DFP) Network Code. This is a numeric identifier for your Ad Manager account.', 'ad-code-manager' ); ?>
126+
<br>
127+
<?php echo wp_kses_post( __( 'Find it in Google Ad Manager: <i>Admin &gt; Global Settings &gt; Network Code</i>.', 'ad-code-manager' ) ); ?>
128+
<br>
129+
<?php esc_html_e( 'Example: 12345678', 'ad-code-manager' ); ?>
130+
</dd>
131+
132+
<dt><?php esc_html_e( 'Tag Name', 'ad-code-manager' ); ?></dt>
133+
<dd>
134+
<?php esc_html_e( 'The ad unit name/path as configured in Google Ad Manager. This is the hierarchical path to your ad unit.', 'ad-code-manager' ); ?>
135+
<br>
136+
<?php esc_html_e( 'Example: "MySite/Homepage/Leaderboard" or just "Leaderboard" for top-level units.', 'ad-code-manager' ); ?>
137+
</dd>
138+
</dl>
139+
<h4><?php esc_html_e( 'Google AdSense Provider', 'ad-code-manager' ); ?></h4>
140+
<p><?php esc_html_e( 'When using the Google AdSense provider:', 'ad-code-manager' ); ?></p>
141+
<dl>
142+
<dt><?php esc_html_e( 'Publisher ID', 'ad-code-manager' ); ?></dt>
143+
<dd>
144+
<?php esc_html_e( 'Your AdSense Publisher ID. This starts with "ca-pub-" followed by a 16-digit number.', 'ad-code-manager' ); ?>
145+
<br>
146+
<?php esc_html_e( 'Example: ca-pub-1234567890123456', 'ad-code-manager' ); ?>
147+
<br>
148+
<?php echo wp_kses_post( __( 'Find it in your AdSense account: <i>Account &gt; Account Information &gt; Publisher ID</i>.', 'ad-code-manager' ) ); ?>
149+
</dd>
150+
</dl>
151+
<?php
152+
$provider_fields = ob_get_clean();
153+
113154
get_current_screen()->add_help_tab(
114155
array(
115156
'id' => 'acm-overview',
@@ -127,9 +168,16 @@ public function render( WP_Screen $screen ): void {
127168
get_current_screen()->add_help_tab(
128169
array(
129170
'id' => 'acm-conditionals',
130-
'title' => 'Conditionals',
171+
'title' => __( 'Conditionals', 'ad-code-manager' ),
131172
'content' => $conditionals,
132173
)
133174
);
175+
get_current_screen()->add_help_tab(
176+
array(
177+
'id' => 'acm-provider-fields',
178+
'title' => __( 'Provider Fields', 'ad-code-manager' ),
179+
'content' => $provider_fields,
180+
)
181+
);
134182
}
135183
}

0 commit comments

Comments
 (0)