Using jquery getScript to call statcounter

Discussion in 'Help' started by Billy Bouchard, Feb 9, 2018.

  1. Billy Bouchard

    Billy Bouchard New Member

    Joined:
    Feb 9, 2018
    Messages:
    1
    Likes Received:
    0
    Hi,

    Is it possible to use jquery getscript to call statcounter in this way :

    var sc_project=12345678;
    var sc_invisible=1;
    var sc_security="xxxxxxxx";
    var sc_https=1;
    var scJsHost = (("https:" == document.location.protocol) ?
    "https://secure." : "http://www.");

    $.getScript( "https://www.statcounter.com/counter/counter.js", function( data, textStatus, jqxhr ) {
    console.log( jqxhr.status ); // 200
    });

    I'm trying to increment my stats after an ajax call. If the above code is not possible what would my alternatives be ?
     

Share This Page