• Great plugin!

    Recently, nothing is showing on the “Audience” page under “Top Referring Domains”. For example, before this issue recently occurred, when a user would visit the site via a Google search, Google would appear under “Top Referring Domains”.

    But recently, there are no entries under “Top Referring Domains”. But there are definitely users coming to the site through Google, Yahoo, etc.

    Any suggestions as to what could be the cause of this issue?

    Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Matthew

    (@mhdizmni)

    Hi @fijisunshine,

    Thank you for opening the thread!

    You can find the “Top Referring Domains” section by navigating to Slimstat > Overview. Please refer to this image.
    Also, ensure the date range for the report is set correctly using the date range selector at the top right corner (see the image).

    If the issue persists, please go to Tools > Site Health > Info in your WordPress admin area and send us a copy of your site information.

    Regards

    Thread Starter fijisunshine

    (@fijisunshine)

    Hi Matthew,

    Thank you for your reply. Yes, I’m able to see the Top Referring Domains section. It’s empty but it shouldn’t be given the date range that I select (and knowing that visitors definitely came to the site via Google search during that date range). In fact, if I set the date range to the past 3 years, the Top Referring Domains section is still blank, which is impossible for this specific website. All the other sections, such as Top Countries and Top Screen Resolutions, are working great. The issue is only with the Top Referring Domains section. There are no errors or issues Tools > Site Health > Info.

    Any suggestions? Thanks again

    Plugin Support Matthew

    (@mhdizmni)

    Please open the browser’s console in Inspect mode and check if any errors are present.
    Also, please review the database on your site to verify if the referer column in the wp_slim_stats table contains any records.

    Additionally, the site information from Tools > Site Health > Info can provide useful details such as installed plugins, PHP version, and more, which will help us investigate and identify the source of the issue.

    Regards

    Thread Starter fijisunshine

    (@fijisunshine)

    Thank you the great suggestions, Matthew. There are no errors in browser console. Yes, there are correct entries in the referer column in the database. For example, Google searches appear as “https://www.google.com/”

    On the Maintenance tab > Tracker Error, I see this error: [September 10, 2024 11:20 pm] 203 Malformed resource URL

    This error seems is related to this SlimStat Analytics support ticket: https://www.ads-software.com/support/topic/tracker-error-203-malformed-resource-url/

    Was Mostafa able to resolve this issue? Or any suggestions? Thanks again

    Thread Starter fijisunshine

    (@fijisunshine)

    In addition to my prior message, another insight:

    When Maintenance > SQL Debug is enabled:

    All of the section, such as Top Countries and Top Cities, show a sql statement that’s executed to generate the content in that section. For example, in Top Cities, the sql statement is: SELECT city, COUNT(*) counthits FROM my_database_slim_stats WHERE city IS NOT NULL AND 1=1 AND dt BETWEEN 1726790400 AND 1726836006 GROUP BY city ORDER BY counthits DESC LIMIT 0, 1000

    However, in the Top Referring Domains section, there’s no sql statement shown. This section continues to only say “No data to display”. The Top Referring Domains section is the only section that doesn’t display a sql statement.

    It seems that no sql statement is being called in the code for the Top Referring Domains section. Any ideas why this would be?

    Plugin Support Matthew

    (@mhdizmni)

    We would appreciate it if you could share your site information with us. Rest assured, the details from Tools > Site Health > Info do not include any sensitive information.

    Thank you for your cooperation!

    Best regards

    Thread Starter fijisunshine

    (@fijisunshine)

    Thank you for your reply, Matthew. More debugging results for you:

    The issue occurs with version 5.0.5 and later. The issue isn’t present in version 5.0.4 and older. With version 5.0.5, the Top Referring Domains section says “There has been a critical error on this website”. With version 5.0.5.1 and later, the Top Referring Domains section says “No data to display”.

    The issue relates to the PREPARE statement on the sql command that generates the data in the Top Referring Domains section. This PREPARE was added in version 5.0.5.

    From the version 5.0.5 code, here is the SQL statement from line 126 in wp-slimstat-reports.php for the Top Referring Domains section:

    ‘slim_p1_10’ => array(
    ‘title’ => (‘Top Referring Domains’, ‘wp-slimstat’), ‘callback’ => array(__CLASS, ‘raw_results_to_html’),
    ‘callback_args’ => array(
    ‘type’ => ‘top’,
    ‘columns’ => ‘REPLACE( SUBSTRING_INDEX( ( SUBSTRING_INDEX( ( SUBSTRING_INDEX( referer, “://”, -1 ) ), “/”, 1 ) ), “.”, -5 ), “www.”, “” )’,
    ‘as_column’ => ‘referer’,
    ‘filter_op’ => ‘contains’,
    ‘where’ => ‘referer NOT LIKE “%’ . str_replace(‘www.’, ”, parse_url(home_url(), PHP_URL_HOST)) . ‘%”‘,
    ‘raw’ => array(‘wp_slimstat_db’, ‘get_top’)
    ),
    ‘classes’ => array(‘normal’),
    ‘locations’ => array(‘slimview2’, ‘slimview5’, ‘dashboard’)

    Here is the php error that I get when running version 5.0.5:

    [26-Sep-2024 02:47:42 UTC] PHP Notice:? Function wpdb::prepare was called <strong>incorrectly</strong>. The query does not contain the correct number of placeholders (2) for the number of arguments passed (1). Please see <a href="https://developer.www.ads-software.com/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 4.8.3.) in REDACTED/wp-includes/functions.php on line 6085

    [26-Sep-2024 02:47:42 UTC] PHP Fatal error:? Uncaught TypeError: array_slice(): Argument #1 ($array) must be of type array, null given in REDACTED/wp-slimstat/admin/view/wp-slimstat-reports.php:990

    Stack trace:

    #0 REDACTED/wp-slimstat/admin/view/wp-slimstat-reports.php(990): array_slice(NULL, 0, '20')

    #1 REDACTED/wp-slimstat/admin/view/wp-slimstat-reports.php(956): wp_slimstat_reports::raw_results_to_html(Array)

    #2 REDACTED/wp-slimstat/admin/view/index.php(153): wp_slimstat_reports::callback_wrapper(Array)

    #3 REDACTED/wp-slimstat/admin/index.php(710): include('REDACTED...')

    #4 REDACTED/wp-includes/class-wp-hook.php(324): wp_slimstat_admin::wp_slimstat_include_view('')

    #5 REDACTED/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)

    #6 REDACTED/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    #7 REDACTED/wp-admin/admin.php(259): do_action('admin_page_slim...')

    #8 {main}

    ? thrown in REDACTED/wp-slimstat/admin/view/wp-slimstat-reports.php on line 990

    Line 990 in wp-slimstat-reports.php in version 5.0.5 is here:

    $results = array_slice(
    $all_results,
    wp_slimstat_db::$filters_normalized[‘misc’][‘start_from’],
    wp_slimstat::$settings[‘rows_to_show’]
    );

    The root cause of the issue seems to be the PREPARE statement on the sql command not executing properly. As a result, $all_results on line 990 is null.

    I did a plugin conflict test and I also did a theme conflict test – those didn’t solve the issue. For security reasons, I’d prefer not to publish Site Health > Info publicly. But I can publish it for you if absolutely necessary to solving this problem.

    Any suggestions? Thanks again!

    Plugin Support Matthew

    (@mhdizmni)

    Thank you @fijisunshine!

    I have forwarded your message to our development team. I will get back to you once we a resolution.

    Best regards

    Plugin Support Matthew

    (@mhdizmni)

    Dear @fijisunshine,

    I’m pleased to inform you that we have resolved the issue in version 5.2.9. Kindly update SlimStat to the latest version and enjoy the improvements!

    We sincerely apologize for the delay and truly appreciate your continued support.

    If you need any assistance, please don’t hesitate to reach out.

    Regards,
    Matthew

    Thread Starter fijisunshine

    (@fijisunshine)

    Hi Matthew,

    Thank you for your reply. And thank you to the development team for looking into this.

    However, I just upgraded to ver. 5.2.9 and the issue still exists. The Top Referring Domains section just says “No data to display”.

    I’m been using ver. 5.0.4, which is the latest version without this issue. And ver. 5.0.4 continues to work well for me – it shows all the Top Referring Domains properly.

    Would you mind forwarding this note to the development team? Thanks again

    Plugin Support Matthew

    (@mhdizmni)

    Dear @fijisunshine,

    Please accept our apologies as we have not been able to resolve the issue. Rest assured, we are fully committed to identifying and fixing the problem.

    I have forwarded this matter to our development team for further investigation. We will keep you updated on any progress.

    Thank you for your continued support and understanding.

    Regards,
    Matthew

    Plugin Support Matthew

    (@mhdizmni)

    Dear @fijisunshine,

    Could you kindly share your site information with us?

    You can find it under Tools > Site Health > Info in your WordPress admin area.

    Please copy the site information and send it to us. This will help us replicate the issue by testing in the same environment and configurations.

    Thank you!

    Regards,
    Matthew

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.