Put this code to functions.php
/**
* Removes '?cli_action=1601400098.174' from url
*/
function remove_cli_action_cookie_plugin() {
if (isset( $_COOKIE[ 'viewed_cookie_policy' ] )) {
?>
<script>
function removeParam(key, sourceURL) {
var rtn = sourceURL.split("?")[0],
param,
params_arr = [],
queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
if (queryString !== "") {
params_arr = queryString.split("&");
for (var i = params_arr.length - 1; i >= 0; i -= 1) {
param = params_arr[i].split("=")[0];
if (param === key) {
params_arr.splice(i, 1);
}
}
rtn = rtn + "?" + params_arr.join("&");
}
let length = rtn.length;
if (rtn.charAt(length - 1) === '?')
rtn = rtn.slice(0, length - 1);
return rtn;
}
currentUrl = window.location + '';
window.history.pushState('hopcipiripi', null, removeParam('cli_action', currentUrl));
</script>
<?php
}
}
add_action( 'wp_footer', 'remove_cli_action_cookie_plugin' );