I have been using the TW-SACK library in my plugin using the below code:
<?php wp_print_scripts(array('sack')); ?>
<script type="text/javascript">
//<![CDATA[
where_go_count = new sack("<?php bloginfo( 'url' ); ?>/index.php");
where_go_count.setVar( "wherego_id", <?php echo $id ?> );
where_go_count.setVar( "wherego_sitevar", document.referrer );
where_go_count.method = 'GET';
where_go_count.onError = function() { return false };
where_go_count.runAJAX();
where_go_count = null;
//]]>
</script>
This used to be the standard format of code on https://codex.wordpress.org/AJAX_in_Plugins, which has since changed.
I am not sure as to how I can modify the above code to use the new format with wp_ajax_ajax
Appreciate any guidance on this.
wp_print_scripts()
.wp_print_scripts