At the beginning of this year I started tracking users who visited my upsell page from my free coming soon plugin in to learn how many of my sales were coming from and to learn how long the conversion time was. I had been tracking this with campaign variables in Google Analytics but I felt it was not giving me an entirely accurate picture. Also Google Analytics only breaks down time to purchase by day. GA was saying 96% of my sales happened within one day. So adding my own tracking cookie would let me figure out exactly what was going on. Here’s how I implemented it. First I add a cookie to the user as soon as they visited my upsell page from my free plugins on Since I don’t index my upsell page and the only way to get to it is via my upsell ad in my free plugin I knew this would only be users coming from the free version. I add this code in my functions.php on my theme. <?php // Set cookie of free user add_action( 'wp', 'track_upsell' ); function track_upsell() { if(is_page('ultimate-coming-soon-page-vs-coming-soon-pro')){ if(!isset($_COOKIE['seedprod_source'])) { setcookie( 'seedprod_source', 'free_plugin|'.time(), strtotime("+1
Share This