Facebook and Clickfunnels Tracking for Clickbank Affiliate Marketing


+1 Likes (2)

When doing any kind or advertising it is very important to track your campaign performance.

This is done for the purpose not to waste money and to be able to scale successful campaign and make more profit.

To be able to do this you have to put unique makers in each of your ads to be able to distinguish between them so that you can pinpoint the ad you want to scale or turn off based on performance.

There are 2 components to make this work:

This short tutorial is done specifically for Rise Academy students who do Facebook advertising and use Clickfunnels as landing page builder to sell products from Clickbank.

Let’s assume our simple funnel is: Facebook Ad (FB) – Clickfunnels landing page (CF) – Clickbank sales page (CB).

FB-CF-CB-Tracking

  • Go to Campaign URL Builder to build your tracking string (you can also use Facebook’s URL tracking builder which is very similar)Campaign URL BuilderSo your resulting URL would look something like this (we are interested in the bold part following the question mark “?”):https://myaffiliatesite.com/?utm_source=fb&utm_medium=cpc&utm_campaign=fd&utm_term=4065&utm_content=img1
  • Since Clickbank uses “tid and “affiliate URL markers to recognize the Clickbank subscriber (affiliate) and the product I am also adding these 2 variables to my string so the URL new string will look like the one below:
  • tid=b92&affiliate=decimator&utm_source=fb&utm_medium=cpc&utm_campaign=fd&utm_term=4065&utm_content=img1
  • When creating your Facebook ad there is a Tracking box where you will paste the above tracking code: 
  • You save your FB ad and your tracking code will be passed to your funnel any time someone clicks on your ad
  • Another FB ad set could have an ad with same above string with only difference being utm_term=4554 and then another with utm_term=5565
  • When FB traffic is coming to your CF landing page they will go through your CF pages and then land on CB sales page or VSL (video sales letter)
  • Your URL parameters need to get passed through your CF pages all the way to the CB sales page
  • Below you will see how to setup the tracking code within CF and this sample is for a specific Quiz Lander page from one of Rise Academy students and anyone else who has similar CF pages I will explain how to adopt this code to their unique CF pages so that it works for them too
  • Code #1 – this will go on every of your CF pages except the last page (thank you page):
  • function put_anchor_tags() {
    
    if ( jQuery( ".elButton" ).length > 0 ) 
    {
    var a_link = jQuery( ".elButton" ).attr( 'href' ).split( "?" )[0] + window.location.search;
    jQuery( ".elButton" ).attr( 'href', a_link );
    }
    }
    
    setInterval(put_anchor_tags, 1000);
    
    function force_anchor() {
    if ( jQuery( '.elButton.elButtonSize1.elButtonColor1.elButtonRounded.elButtonPadding2.elBtnVP_10.elButtonCorner3.elButtonFluid.elBtnHP_25.elBTN_b_1.elButtonShadowN1.elButtonTxtColor1' ).length > 0 ) {
    jQuery( '.elButton.elButtonSize1.elButtonColor1.elButtonRounded.elButtonPadding2.elBtnVP_10.elButtonCorner3.elButtonFluid.elBtnHP_25.elBTN_b_1.elButtonShadowN1.elButtonTxtColor1' ).on('click', function(e) {
    var anchor_link = jQuery( this ).attr( 'href' );
    if ( anchor_link !== "#" ) {
    window.location = anchor_link;
    }
    })
    }
    }
    setInterval( force_anchor, 1000 );
    
  • Code #2 – this will go on the last page (thank you page) after the quiz ends:
  • function removeURLParameter(url, parameter) {
        //prefer to use l.search if you have a location/link object
        var urlparts= url.split('?');   
        if (urlparts.length>=2) {
    
            var prefix= encodeURIComponent(parameter)+'=';
            var pars= urlparts[1].split(/[&;]/g);
    
            //reverse iteration as may be destructive
            for (var i= pars.length; i-- > 0;) {    
                //idiom for string.startsWith
                if (pars[i].lastIndexOf(prefix, 0) !== -1) {  
                    pars.splice(i, 1);
                }
            }
    
            url= urlparts[0]+'?'+pars.join('&');
            return url;
        } else {
            return url;
        }
    }
    console.log(removeURLParameter(url, 'surveyoutcome'));
    console.log(removeURLParameter(url, 'surveyresults'));
    
    function put_anchor_tags() {
    if ( jQuery( ".elButton" ).length > 0 ) 
    {
    var a_link = jQuery( ".elButton" ).attr( 'href' ).split( "?" )[0] + window.location.search;
    jQuery( ".elButton" ).attr( 'href', a_link );
    }
    }
    setInterval(put_anchor_tags, 1000);
    
    function force_anchor() {
    if ( jQuery( '.elButton.elButtonSize1.elButtonColor1.elButtonRounded.elButtonPadding2.elBtnVP_10.elButtonCorner3.elButtonFluid.elBtnHP_25.elBTN_b_1.elButtonShadowN1.elButtonTxtColor1' ).length > 0 ) {
    jQuery( '.elButton.elButtonSize1.elButtonColor1.elButtonRounded.elButtonPadding2.elBtnVP_10.elButtonCorner3.elButtonFluid.elBtnHP_25.elBTN_b_1.elButtonShadowN1.elButtonTxtColor1' ).on('click', function(e) {
    var anchor_link = jQuery( this ).attr( 'href' );
    if ( anchor_link !== "#" ) {
    window.location = anchor_link;
    }
    })
    }
    }
    setInterval( force_anchor, 1000 );
    
  • There will be an additional step at the end of the quiz – we will need to ad a button in order to pass the variables from quiz end to the thank you page-see video
  • I will add additional steps another day to show how to adopt the code to other CF pages (since every page created unique HTML tags so the javascript has to be adopted to work with that specific page)

Part #1 – Code Adaptation

Follow me on:  YT  FB  IG