Forums

[Plugin: Heatmap Plugin] WP-Subdomains and Heat Map Plugin (2 posts)

  1. thinkunique
    Member
    Posted 2 years ago #

    Hello, I am looking for this to work with subdomains. Is there a problem that keeps that from happening? I have tried but "example.website.com" will not record clicks, but "www.website.com" will.

    Thanks,
    Peter.

    http://wordpress.org/extend/plugins/heatmap/

  2. Dave Ross
    Member
    Posted 2 years ago #

    To make this work with WP-Subdomains, open up heatmap.php and replace the heatmap_set_wpurl() function with the following (tested by Peter):

    /**
     * Function set domain name
     */
    function heatmap_set_wpurl() {
    	if(defined('WPS_VERSION')) {
    		// WP-Subdomains installed
    		$wpURL = 'http://'.$_SERVER['HTTP_HOST'];
    	}
    	else {
    		$wpURL = get_bloginfo('wpurl');
    	}
    	echo "<script type=\"text/javascript\">\n//<![CDATA[ \n\tvar WPURL = '$wpURL';\n //]]>\n</script>";
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags