• Resolved maijintheartist

    (@maijintheartist)


    Love your plugin. HOWEVER, theres a major problem!

    PROBLEM: your analytics tool is NO LONGER tracking/logging the hits I receive from my website redirects. One of the main website directs im most concerned about is my http://www.contactdrew.com redirect. Your tool used to track all the hits i received from this website redirect, but as of a few months ago, it stopped tracking them.

    TESTING: I have uninstalled, reinstalled, and made sure all settings are correct on this plugin. I even disabled cache plugins i was using to make sure it wasnt the problem. so after weeks of testing, ive found that it is simply a bug in your plugin.

    WHAT DO I NEED FROM YOU?: I need you to fix this bug! i should be able to track all the hits to my website like your plugin used to do! the website redirects should hit my main website and it should log that activity so i can measure the effectiveness of my marketing efforts! please offer quick and fast solutions and troubleshooting. i need this fixed asap!

Viewing 1 replies (of 1 total)
  • Hi @maijintheartist

    If you open browser console, then you can see:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxxxx.tld/wp-admin/admin-ajax.php. (Reason: missing token 'x-requested-with' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel).

    It’s case when wp-admin uses https (and ajax request), but website uses http. (you can see HTML source – find ajaxurl). It’s side effect of changes described in https://ww.wp.xz.cn/support/topic/slimstat-stopped-working-on-two-of-my-websites/

    It seems that’s issue related to WP core (and it’s possible issue in WP core). Also, I had trouble with other plugins. I’ve found simple workaround with following filter:

    add_filter( 'allowed_http_origin', 'ajaxfix_send_cors_headers' );
    
    function ajaxfix_send_cors_headers( $origin ) {
    
            // Access-Control headers are received during OPTIONS requests
            if (  $origin && 'OPTIONS' === $_SERVER['REQUEST_METHOD'] ) {
    
                    if ( isset( $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'] ) ) {
                            @header( 'Access-Control-Allow-Headers: '. $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'] );
                    }
    
            }
    
            return $origin;
    
    }
    

    I recommend to you create mu-plugin and insert code there because it’s loaded before all regular plugin. ( https://codex.ww.wp.xz.cn/Must_Use_Plugins ) I’m testing this solution on couple websites and I didn’t notice similar issues for now.

    I hope that I helped to you find root of your issue.

    Regards,
    Sasa

Viewing 1 replies (of 1 total)

The topic ‘PROBLEM! Analytics Not Tracking Website Redirect Hits.’ is closed to new replies.