Skip to content

Commit bbd95c2

Browse files
look in instead of now we're using sendBeacon with data parameter
1 parent aca8895 commit bbd95c2

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/collect-functions.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,7 @@ function collect_request()
9999
return;
100100
}
101101

102-
// if WP environment is loaded and URL says to disable custom endpoint, do it
103-
if (isset($_GET['disable-custom-endpoint']) && \function_exists('update_option')) {
104-
update_option('koko_analytics_use_custom_endpoint', false, true);
105-
}
106-
107-
$data = isset($_GET['e']) ? extract_event_data($_GET) : extract_pageview_data($_GET);
102+
$data = isset($_POST['e']) ? extract_event_data($_POST) : extract_pageview_data($_POST);
108103
if (!empty($data)) {
109104
// store data in buffer file
110105
$success = collect_in_file($data);
@@ -223,7 +218,7 @@ function get_client_ip(): string
223218
function determine_uniqueness($thing): array
224219
{
225220
// determine uniqueness based on specified tracking method
226-
switch ($_GET['m'] ?? 'n') {
221+
switch ($_POST['m'] ?? 'n') {
227222
case 'c':
228223
return determine_uniqueness_cookie($thing);
229224
break;

0 commit comments

Comments
 (0)