• Resolved david.diez

    (@daviddiez)


    Hello,

    We use Unbounce to create some landing pages. We realized that for the pages we created using Unbounce, the SEO conversions are not happening because the visitorID cookie used on those pages is being stripped; every time you load the page a new cookie is set.

    The Unbounce help desk suggested that we can apply an exclusion for those pages so cookies are not catched.

    Is it posible to configure Autoptimize to exclude URLs and/or cookies?

    Thanks,

    David.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Afternoon @daviddiez;
    Autoptimize does not know of *cookies* as such, but I guess the pages have JavaScript in them that sets the cookie and that JavaScript when optimized is not executing, so you have 2 possible solutions:

    1. exclude those pages from autoptimization, which can be done with a code snippet like this one (which would force AO to skip any page that has “unbounce/” or “nobounce/pagename” in the URL) not optimize ;

    
    add_filter('autoptimize_filter_noptimize','unbounce_noptimize',10,0);
    function unbounce_noptimize() {
    	if ((strpos($_SERVER['REQUEST_URI'],'unbounce/')!==false) && (strpos($_SERVER['REQUEST_URI'],'nobounce/pagename')!==false)) {
    		return true;
    	} else {
    		return false;
    	}
    }

    2. exclude the unbounce JS from autoptimization (provided off course that unbounce does use JS to set/ read cookies)

    Lastly: Autoptimize does not cache pages, so if your problem is with pages being cached, you’d have to look into the page caching solution you’re using.

    Hope this helps,
    frank

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude URLs (or Cookies) from optimization’ is closed to new replies.