Your client library and Google Ads API versions:
- Google API Client library version: v2.13.2
- Google Ads API version: V13 and V14
Your environment:
================= PHP GENERAL INFORMATION
phpinfo()
PHP Version => 8.2.12
System => Linux ec9e56c3263d 6.2.0-36-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 4 10:14:28 UTC 2023 x86_64
Build Date => Oct 28 2023 01:59:11
Build System => Linux 414858d57bde 5.10.0-13-cloud-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
Configure Command => './configure' '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--with-pic' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-password-argon2' '--with-sodium=shared' '--with-pdo-sqlite=/usr' '--with-sqlite3=/usr' '--with-curl' '--with-iconv' '--with-openssl' '--with-readline' '--with-zlib' '--disable-phpdbg' '--with-pear' '--with-libdir=lib/x86_64-linux-gnu' '--disable-cgi' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' 'build_alias=x86_64-linux-gnu'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc/php
Loaded Configuration File => (none)
Scan this dir for additional .ini files => /usr/local/etc/php/conf.d
Additional .ini files parsed => /usr/local/etc/php/conf.d/31-disable-php-header.ini,
/usr/local/etc/php/conf.d/docker-fpm.ini,
/usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini,
/usr/local/etc/php/conf.d/docker-php-ext-grpc.ini,
/usr/local/etc/php/conf.d/docker-php-ext-intl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini,
/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-redis.ini,
/usr/local/etc/php/conf.d/docker-php-ext-soap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
PHP API => 20220829
PHP Extension => 20220829
Zend Extension => 420220829
Zend Extension Build => API420220829,NTS
PHP Extension Build => API20220829,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
Zend Max Execution Timers => disabled
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters => zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk
This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.2.12, Copyright (c) Zend Technologies
with Zend OPcache v8.2.12, Copyright (c), by Zend Technologies
================= PHP EXTENSION INFORMATION
The PHP Extension grpc is installed: 1.59.1
The PHP Extension protobuf is not installed
Description of the bug:
Using the example provided here in the Remarketing/AddFlexibleRuleUserList example.

Steps to reproduce:
- Create a Rule Based User List
- Use the example provided here
- Run the script
- Inspect the output in the Google Ads Audience Manager
- You should see that the Audience is set to Web page visit in the past 540 days despite sending 365

Attempting to update the membership lifespan via the API will result in no change in Google Ads.
Expected behavior:
The Audience Manager should reflect the 365 day lifespan I'm sending, not 540.
Request/Response Logs:
Here's the debug logs from my attempt to create a user list with the example
[2023-11-08T17:41:41.698198+00:00] google-ads.INFO: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v15.services.UserListService/MutateUserLists", CustomerId: 8995252199, RequestId: "TtqHYeQB4hP39_X1qFpKvQ", IsFault: 0, FaultMessage: "None"
[2023-11-08T17:41:41.699099+00:00] google-ads.DEBUG: Request
-------
Method Name: /google.ads.googleads.v15.services.UserListService/MutateUserLists
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/8.2.12 gccl\/21.1.0 gapic\/21.1.0 gax\/1.25.0 grpc\/1.59.1 rest\/1.25.0 pb\/+n",
"User-Agent": "gcloud-php-new\/21.1.0",
"x-goog-request-params": "customer_id=8995252199",
"developer-token": "REDACTED",
"login-customer-id": "6281286582"
}
Request:
{"customerId":"8995252199","operations":[{"create":{"name":"All visitors to http:\/\/example.com\/example1 AND http:\/\/example.com\/example2 but NOT http:\/\/example.com\/example3 #2023-11-08T17:41:40.937+00:00","description":"Visitors of both http:\/\/example.com\/example1 AND http:\/\/example.com\/example2 but NOT http:\/\/example.com\/example3","membershipStatus":"OPEN","membershipLifeSpan":"365","ruleBasedUserList":{"prepopulationStatus":"REQUESTED","flexibleRuleUserList":{"inclusiveRuleOperator":"AND","inclusiveOperands":[{"rule":{"ruleItemGroups":[{"ruleItems":[{"name":"url__","stringRuleItem":{"operator":"EQUALS","value":"http:\/\/example.com\/example1"}}]}]},"lookbackWindowDays":"7"},{"rule":{"ruleItemGroups":[{"ruleItems":[{"name":"url__","stringRuleItem":{"operator":"EQUALS","value":"http:\/\/example.com\/example2"}}]}]},"lookbackWindowDays":"7"}],"exclusiveOperands":[{"rule":{"ruleItemGroups":[{"ruleItems":[{"name":"url__","stringRuleItem":{"operator":"EQUALS","value":"http:\/\/example.com\/example3"}}]}]}}]}}}}]}
Response
-------
Headers: {
"content-disposition": "attachment",
"request-id": "TtqHYeQB4hP39_X1qFpKvQ",
"date": "Wed, 08 Nov 2023 17:41:41 GMT",
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"
}
Response:
{"results":[{"resourceName":"customers\/8995252199\/userLists\/8483840056"}]}
Anything else we should know about your project / environment:
The only modification I made to the example was to add a needed withLoginCustomerId call to the client used so I could create the list.
This behavior seems most unexpected, according to the API docs when left out, the membership lifespan should default to 30 days; but when I remove the lifespan field it is still getting set to 540 in the Google Ads UI.