Download

Documentation

Print This page

How To Remove Trailing Slash From Google Analytics?

If you have removed the trailing slash from Tracking your website URLs in Google Analytics. You must be having trouble in viewing stats per post/page in Analytify.

We have come up with a solution to overcome this problem. Add the following code in your theme functions.php file and then view the stats for each page or post.

/**
* Remove Trailing Slash for Analytify Single Page/Post Stats.
* Add this code snippet in your theme functions.php
*
*/
function analytify_remove_trailing_slash( $permalink, $post_id ) {
return rtrim( $permalink, '/' );
}
add_filter( 'analytify_sinlge_stats_permalink', 'analytify_remove_trailing_slash', 10, 2 );
Remove trailing slash from Google Analytics

Cheers!

Enjoy all time low prices and LIFETIME deal this BlackFriday season.
Buy Now 
close-image