is it correct or not because it show an error when im done that
if(is_page('payment-success')) {
include("/wp-content/ga-ecommerce-tracking/ga-ecommerce-tracking.php");
}
Include accepts absolute path, relative path or a URL stream as its argument. But you are using a wrong absolute path here. Try making it to relative path ( I am assuming that you are editing a file in Wordpress root directory, if not change the path accordingly)
if(is_page('payment-success')) {
include("./wp-content/ga-ecommerce-tracking/ga-ecommerce-tracking.php");
}
include expects to take a path on the filesystem as its argument. You appear to be passing in root relative URL.
/, if that is a valid filesystem path, then WordPress is installed in the system root directory! There is a web accessible directory called wp-content in the top level directory of a WordPress install, so if WordPress is installed in the webroot for a domain, then that will be an accessible URI if ga-ecommerce-tracking is put in it../