Posts by PearlBSlattery

1 post
PearlBSlattery says


This breaks my brain :)

haha!

Well, I think it works here. But I haven’t seen any real clicks yet, just my two test clicks.

All ucm_* parameters are prefixed with a “B” so I can tell which ones have “Bounced” through to the marketplace.

Here’s my two WordPress analytic test clicks:

\\

My my two Marketplace analytics test clicks that went through:

\\

If you’re not seeing anything in your marketplace analytics maybe try the prefix thing?

Hopefully I see some real clicks this week. I still haven’t recorded a real Marketplace conversion from Adwords yet :(

Here’s my (rushed @ 11pm) javascript code to capture utm* parameters on WordPress and pass them through to CodeCanyon:

(if you have better code please share!)

<script type="text/javascript">
function GA_Get_Cookie(e){var t=document.cookie.split(";");var n="";var r="";var i="";var s=false;var o="";for(o=0;o<t.length;o++){n=t[o].split("=");r=n[0].replace(/^\s+|\s+$/g,"");if(r==e){s=true;if(n.length>1){i=unescape(n[1].replace(/^\s+|\s+$/g,""))}return i;break}n=null;r=""}if(!s){return null}}function GA_Set_Cookie(e,t,n,r,i,s){var o=new Date;o.setTime(o.getTime());if(n){n=n*1e3*60*60*24}var u=new Date(o.getTime()+n);document.cookie=e+"="+escape(t)+(n?";expires="+u.toGMTString():"")+(r?";path="+r:"")+(i?";domain="+i:"")+(s?";secure":"")}
var ga_get_params=function(e){var t=function(e,n){var r=n[0];var i=r.split("=");var s=decodeURIComponent(i[0]);var o=decodeURIComponent(i.slice(1).join("="));if(typeof e[s]==="undefined"){e[s]=o}else{e[s]=[].concat(e[s],o)}return n.length==1?e:t(e,n.slice(1))};return e.length==0?{}:t({},e.substr(1).split("&"))}
    var params = ga_get_params(location.search);
    if(typeof JSON != 'undefined' && typeof JSON.stringify != 'undefined'){
        if(params && typeof params.utm_source != 'undefined'){
            GA_Set_Cookie('dtbaker_utm',JSON.stringify(params));
        }
        var c = JSON.parse(GA_Get_Cookie('dtbaker_utm'));
        if(c && typeof c.utm_source != 'undefined'){
            var extra_params = "";
            var capture_params = ['utm_source','utm_medium','utm_campaign','utm_content'];
            for(var i in capture_params){
                if(capture_params.hasOwnProperty(i)){
                    if(typeof c[capture_params[i]] != 'undefined'){
                        extra_params += capture_params[i] + '=B' + c[capture_params[i]].replace(/[\W\s]+/g,"") + '&';
                    }
                }
            }
            // add this to any codecanyon links on the current page.
            jQuery('a[href^="http://codecanyon.net"]').each(function(){
                var h = jQuery(this).attr('href');
                h += (h.match(/\?/) ? '&' : '?') + extra_params;
                jQuery(this).attr('href',h);
            });
        }
    }
</script>
by
by
by
by
by
by