Forum Replies Created

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter elseyadcock

    (@elseyadcock)

    The success of this plug-in might depend on your hosting also. The example I provided was hosted with Bluehost (not my normal host) and I notice that it saves a php session cookie. Some hosts will install these by default, as Bluehost. My usual hosting does not save any cookies until a user has signed up.

    My view, from what I have read online, is that these session cookies may be deemed as essential to the workings of the site. Apart from anything else I don’t think it will be possible to stop this if the site is on a shared server with no access to php etc.

    Thread Starter elseyadcock

    (@elseyadcock)

    The initial version that was released didn’t work out of the box. I had to do a bit of hacking around to get it working. I do have a solution that works pretty well. I think the plug-in has been updated but I don’t know if it works any better.

    The missing bit was a simple conditional statement wrapping the GA code. So….

    <?php // If our cookie is set
    		if(isset($_COOKIE['ecd_opt_in']) && !empty($_COOKIE['ecd_opt_in'])) { ?>
    
    	<!--Your Javascript GA tracking code here-->
    
    		<?php } ?>

    You have to add your GA code manually in the place provided.

    See https://www.metalucci.com/ for an example.

    Hope this helps.

Viewing 2 replies - 16 through 17 (of 17 total)