File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,31 +64,27 @@ private static function get_post_id(): int
6464 return -1 ;
6565 }
6666
67- private static function get_tracker_urls (): array
67+ private static function get_tracker_url (): string
6868 {
69- $ urls = [];
70-
7169 // People can create their own endpoint and define it through this constant
7270 if (\defined ('KOKO_ANALYTICS_CUSTOM_ENDPOINT ' ) && KOKO_ANALYTICS_CUSTOM_ENDPOINT ) {
7371 // custom custom endpoint
74- $ urls [] = site_url (KOKO_ANALYTICS_CUSTOM_ENDPOINT );
72+ return site_url (KOKO_ANALYTICS_CUSTOM_ENDPOINT );
7573 } elseif (using_custom_endpoint ()) {
7674 // default custom endpoint
77- $ urls [] = site_url ('/koko-analytics-collect.php ' );
75+ return site_url ('/koko-analytics-collect.php ' );
7876 }
7977
8078 // default URL (which includes WordPress)
81- $ urls [] = admin_url ('admin-ajax.php?action=koko_analytics_collect ' );
82-
83- return $ urls ;
79+ return admin_url ('admin-ajax.php?action=koko_analytics_collect ' );
8480 }
8581
8682 public static function print_js_object ()
8783 {
8884 $ settings = get_settings ();
8985 $ script_config = [
9086 // the URL of the tracking endpoint
91- 'urls ' => self ::get_tracker_urls (),
87+ 'url ' => self ::get_tracker_url (),
9288
9389 // root URL of site
9490 'site_url ' => get_home_url (),
You can’t perform that action at this time.
0 commit comments