bool) for the * Custom Dimensions tab. A property absent from the map is treated * as included so a fresh resource key onboards with everything * pre-ticked. Persisted by populate_selected_dimensions and read by * apply_custom_dimensions_to_ga4 to filter the create batch. */ const GA_DIMENSIONS_INCLUDED = "fiftyonedegrees_dimensions_included"; /** * Key to store Google Analytics JavaScript code. */ const GA_JS = "fiftyonedegrees_ga_tracking_javascript"; /** * Key to store whether or not Google Analyics tracking id has been * updated. */ const GA_ID_UPDATED = "fiftyonedegrees_ga_tracking_id_update_flag"; /** * Key to store whether or not the Google Analytics send page view option * has been updated. */ const GA_SEND_PAGE_VIEW_UPDATED = "fiftyonedegrees_ga_send_page_view_update_flag"; /** * Key used to store a boolean flag if there was an error using the Google * Analytics tracking id. */ const GA_TRACKING_ID_ERROR = "fiftyonedegrees_ga_tracking_id_error"; /** * Key used to store whether or not the Google Analytics custom dimensions * admin screen is available. If Google Analytics has been set up correctly, * then this will have the value 'enabled'. */ const GA_CUSTOM_DIMENSIONS_SCREEN = "fiftyonedegrees_ga_custom_dimension_screen"; /** * Key used to store the map of custom dimensions to be sent to Google * Analytics. */ const GA_CUSTOM_DIMENSIONS_MAP = "fiftyonedegrees_ga_cust_dims_map"; /** * Key used to store the data at which the access token was aquired for * Google Analytics. */ const GA_AUTH_DATE = "fiftyonedegrees_ga_auth_date"; /** * Per-site HMAC secret used to sign the OAuth state parameter. * Initialized lazily on the first OAuth flow start via * FiftyOneDegreesOauthState::get_or_create_secret(). * * Write semantics: add_option($name, $value, '', 'no') — autoload=no, * set-once-immutable. Never use update_option on this key, otherwise * in-flight states issued under the previous secret will become * unverifiable. Rotation requires an explicit delete_option + * re-initialization (manual maintenance task, not exposed in UI). */ const OAUTH_STATE_SECRET = "fiftyonedegrees_oauth_state_secret"; /** * Current OAuth + GA schema version marker. Used as a generation * gate by FiftyOneDegreesOauthMigration to wipe stale GA state on * upgrade. * * History: * - Absent / not '2' and not '3': OOB-era install (Google sunset * Jan 2023). Migration to v2 cleared OOB state. * - '2': HMAC + PKCE OAuth, Universal Analytics API (UA). * - '3': GA4 schema (Admin API + analytics.edit scope + new * option keys). Upgrade from v2 wipes every GA-related option * to force re-consent under the broader scope and to drop UA * fields that have no GA4 equivalent. * * See FiftyOneDegreesOauthMigration::run for the gate. */ const GA_OAUTH_VERSION = "fiftyonedegrees_ga_oauth_version"; /** * Options group key for suspicious activity detection settings. */ const SUSPICIOUS_GROUP_KEY = "fiftyonedegrees_suspicious_options"; /** * Key for storing whether suspicious activity detection is enabled. * Value is 'on' or 'off'. */ const SUSPICIOUS_ENABLE = "fiftyonedegrees_suspicious_enable"; /** * Key for storing the URL to redirect suspicious visitors to. */ const SUSPICIOUS_REDIRECT_URL = "fiftyonedegrees_suspicious_redirect_url"; /** * Key for storing the number of requests that triggers a redirect. */ const SUSPICIOUS_REQUESTS = "fiftyonedegrees_suspicious_requests"; /** * Key for storing the time window (in seconds) for counting requests. */ const SUSPICIOUS_WINDOW = "fiftyonedegrees_suspicious_window"; /** * Key used to store selected standard TDL IDs. * Stored as an array of string IDs matching entries in config/robots-standard-tdls.json. */ const ROBOTS_STANDARD_TDL_SELECTED = "fiftyonedegrees_robots_standard_tdl_selected"; /** * Key used to store user-entered custom TDL URLs. * Stored as an indexed array of URL strings. */ const ROBOTS_CUSTOM_TDL = "fiftyonedegrees_robots_custom_tdl"; /** * Key used to store whether robots.txt hosting is enabled. */ const ROBOTS_ENABLE = "fiftyonedegrees_robots_enable"; /** * Key used to store whether crawler enforcement (302 redirects) is enabled. */ const ROBOTS_ENFORCE = "fiftyonedegrees_robots_enforce"; /** * Key used to store the redirect URL for bot enforcement. */ const ROBOTS_REDIRECT_URL = "fiftyonedegrees_robots_redirect_url"; /** * Key used to store custom top entries for robots.txt. */ const ROBOTS_CUSTOM_TOP = "fiftyonedegrees_robots_custom_top"; /** * Key used to store custom bottom entries for robots.txt. */ const ROBOTS_CUSTOM_BOTTOM = "fiftyonedegrees_robots_custom_bottom"; /** * Key used to store allowed crawler categories for robots.txt enforcement. * When never saved (null), defaults apply: deny Index, Train, Input; allow all others. */ const ROBOTS_ALLOWED_CATEGORIES = "fiftyonedegrees_robots_allowed_categories"; /** * Key used to cache the cloud-generated plain-text robots.txt content. */ const ROBOTS_PLAINTEXT_CACHE = "fiftyonedegrees_robots_plaintext_cache"; /** * Durable record of the last cloud refresh attempt for robots.txt. * Shape: ['status' => 'success'|'error', 'timestamp' => int, * 'message' => string, 'http_status' => ?int]. * Survives the daily cron's 60-second error transient so admins * see a stale-cache indicator next time they open the admin page. */ const ROBOTS_LAST_REFRESH = "fiftyonedegrees_robots_last_refresh"; // Last make_pipeline() error message; stored separately from // Options::PIPELINE so a good cached pipeline is preserved. const PIPELINE_VALIDATION_ERROR = "fiftyonedegrees_pipeline_validation_error"; /** * Key used to store whether the 51Degrees pipeline (device detection) is enabled. */ const PIPELINE_ENABLE = "fiftyonedegrees_pipeline_enable"; /** * Options group key for the PMP (Preference Management Platform) settings tab. */ const PMP_GROUP_KEY = "fiftyonedegrees_pmp_options"; /** * Key for storing whether the Preference Management Platform widget * is enabled on public pages. Value: 'on' or 'off'. */ const PMP_ENABLE = "fiftyonedegrees_pmp_enable"; /** * Key for storing the publisher's static TCF Vendor consent string. * Generated externally via TCF Tools; PMP overlays purpose consents * onto this base string at runtime. */ const PMP_TCF_VENDOR_STRING = "fiftyonedegrees_pmp_tcf_vendor_string"; /** * Key for storing the label shown on the Alternative button * (e.g. 'Pay', 'Subscribe'). */ const PMP_ALT_LABEL = "fiftyonedegrees_pmp_alt_label"; /** * Key for storing the URL the user is navigated to when the * Alternative button is clicked. */ const PMP_ALT_URL = "fiftyonedegrees_pmp_alt_url"; /** * Key for storing the publisher's brand name displayed in the * PMP popup. */ const PMP_BRAND_NAME = "fiftyonedegrees_pmp_brand_name"; /** * Key for storing the URL of the publisher's brand logo image * rendered in the PMP popup. */ const PMP_BRAND_LOGO_URL = "fiftyonedegrees_pmp_brand_logo_url"; /** * Key for storing the URL of the publisher's terms / privacy * policy page linked from the PMP popup. */ const PMP_BRAND_TERMS_URL = "fiftyonedegrees_pmp_brand_terms_url"; /** * Key for storing whether the Standard marketing option is shown * in the PMP popup alongside Personalized and the alternative. * Value: 'on' or 'off'. */ const PMP_SHOW_STANDARD = "fiftyonedegrees_pmp_show_standard"; } ?>