* Get the resolved consent state value to send with analytics request * @param {!Element} element * @return {!Promise<?string>}
(element)
| 586 | * @return {!Promise<?string>} |
| 587 | */ |
| 588 | function getConsentStateStr(element) { |
| 589 | return getConsentPolicyState(element).then((consent) => { |
| 590 | if (!consent) { |
| 591 | return null; |
| 592 | } |
| 593 | return EXTERNAL_CONSENT_POLICY_STATE_STRING[consent]; |
| 594 | }); |
| 595 | } |
| 596 | |
| 597 | /** |
| 598 | * Get the associated value from the resolved consent metadata object |
no test coverage detected