Skip to content

Commit e554a40

Browse files
🤖 Merge PR DefinitelyTyped#74906 Sync latest changes to @types/google-publisher-tag by @google-publisher-tag
Co-authored-by: jimper <jimper@users.noreply.github.com>
1 parent e612d42 commit e554a40

3 files changed

Lines changed: 66 additions & 3 deletions

File tree

‎types/google-publisher-tag/google-publisher-tag-tests.ts‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Tests for Google Publisher Tag 1.20260413
2-
// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/a7102d4da14f534c852664c73adb77db8b803545
1+
// Tests for Google Publisher Tag 1.20260420
2+
// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/fec849a853dfba65b7059ba9c2f6a30bbcfa4add
33

44
// Test for googletag.cmd
55
function test_googletag_cmd() {
@@ -123,6 +123,19 @@ function test_googletag_privacySettingsConfig_trafficSource() {
123123
});
124124
}
125125

126+
// Test for googletag.PrivacySettingsConfig.tagForAgeTreatment
127+
function test_googletag_privacySettingsConfig_tagForAgeTreatment() {
128+
// Enable teen privacy treatment.
129+
googletag.pubads().setPrivacySettings({
130+
tagForAgeTreatment: googletag.enums.TagForAgeTreatment.TEEN,
131+
});
132+
133+
// Clear age treatment configuration.
134+
googletag.pubads().setPrivacySettings({
135+
tagForAgeTreatment: googletag.enums.TagForAgeTreatment.UNSPECIFIED,
136+
});
137+
}
138+
126139
// Test for googletag.PubAdsService.setTargeting
127140
function test_googletag_pubAdsService_setTargeting() {
128141
// Example with a single value for a key.

‎types/google-publisher-tag/index.d.ts‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,33 @@ declare namespace googletag {
442442
* });
443443
*/
444444
trafficSource?: enums.TrafficSource;
445+
446+
/**
447+
* The age-restricted treatment, indicating whether the ad request should be
448+
* treated as child, teen, or unspecified.
449+
*
450+
* Consult your own legal counsel to determine the age treatment settings for
451+
* your users based on your legal and regulatory requirements. For more
452+
* information on this setting, review this [Help Center article](
453+
* https://support.google.com/adsense/answer/9007197).
454+
*
455+
* By setting this property, you certify that this notification is accurate
456+
* and you are authorized to act on behalf of the owner of the site. You
457+
* understand that abuse of this setting may result in termination of your
458+
* Google account.
459+
*
460+
* @example
461+
* // Enable teen privacy treatment.
462+
* googletag.pubads().setPrivacySettings({
463+
* tagForAgeTreatment: googletag.enums.TagForAgeTreatment.TEEN
464+
* });
465+
*
466+
* // Clear age treatment configuration.
467+
* googletag.pubads().setPrivacySettings({
468+
* tagForAgeTreatment: googletag.enums.TagForAgeTreatment.UNSPECIFIED
469+
* });
470+
*/
471+
tagForAgeTreatment?: enums.TagForAgeTreatment;
445472
}
446473

447474
/**
@@ -2859,6 +2886,29 @@ declare namespace googletag {
28592886
/** Direct URL entry, site search, or app download. */
28602887
ORGANIC,
28612888
}
2889+
2890+
/**
2891+
* Age treatment settings supported by GPT.
2892+
*
2893+
* @see {@link PrivacySettingsConfig.tagForAgeTreatment}
2894+
*/
2895+
enum TagForAgeTreatment {
2896+
/**
2897+
* Default value. Indicates that no specific age restricted treatment signal
2898+
* applies to the ad request.
2899+
*/
2900+
UNSPECIFIED,
2901+
2902+
/**
2903+
* Indicates that ad requests should receive CHILD age treatment.
2904+
*/
2905+
CHILD,
2906+
2907+
/**
2908+
* Indicates that ad requests should receive TEEN age treatment.
2909+
*/
2910+
TEEN,
2911+
}
28622912
}
28632913

28642914
/**

‎types/google-publisher-tag/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/google-publisher-tag",
4-
"version": "1.20260413.9999",
4+
"version": "1.20260420.9999",
55
"nonNpm": "conflict",
66
"nonNpmDescription": "Google Publisher Tag",
77
"projects": [

0 commit comments

Comments
 (0)