@coolmann
I found a solution for my problem… thanks for this awesome plugin!
@everyone who has the same problem:
i added this:
if(method_exists ('wp_slimstat', 'slimtrack'))
wp_slimstat::slimtrack();
before my redirect.
In my plugin i than implemented the filter:
add_filter( 'slimstat_filter_pageview_stat', 'my_redirect_pageview_stat' );
My implementation than checks if the resource is a redirect:
public function my_redirect_pageview_stat($_stat = array() ){
if(isset($_stat['resource']) && strpos($_stat['resource'], '/my/path/to/redirect/')===0){
//do stuff to get the actual url to redirect:
String redirectUrl = "http://www.ThisIsTheRedirect.uri";
$_stat[ 'outbound_resource' ] = redirectUrl;
}
return $_stat;
}
@coolmann
Thanks for the response… i have the same problem, can you maybe provide a small example? How do i pass the external url to which i want to redirect to slimtrack?
public static function slimtrack($_argument = '')
Is there am documentation of the $_argument’s structure? Is it possible to pass “$data_js” as an argument?
If i get it right i need to set somehow $data_js[‘res’] to the outbound url?
Thanks,
Julian