* Returns the client ID to be used. * @return {?string} * @private
()
| 18386 | * @private |
| 18387 | */ |
| 18388 | getClientId_() { |
| 18389 | if (!this.clientId_) { |
| 18390 | // Match '__gads' (name of the cookie) dropped by Ads Tag. |
| 18391 | const gadsmatch = this.getDocumentCookie_().match( |
| 18392 | '(^|;)\\s*__gads\\s*=\\s*([^;]+)' |
| 18393 | ); |
| 18394 | // Since the cookie will be consumed using decodeURIComponent(), |
| 18395 | // use encodeURIComponent() here to match. |
| 18396 | this.clientId_ = gadsmatch && encodeURIComponent(gadsmatch.pop()); |
| 18397 | } |
| 18398 | return this.clientId_; |
| 18399 | } |
| 18400 | |
| 18401 | /** |
| 18402 | * @private |
no test coverage detected