ClickBankSuccessForum.com Forum Index ClickBankSuccessForum.com
ClickBank Success Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   LoginLogin 

Clickbank Success Forum Featured Links.

  • ClickBank Affiliate SuperTips
  • The number one marketing tool
  • $7 ClickBank Reports
  • The Ultimate Rebrander
  • To see how your message can be featured, Click here.

    My CB affiliate wants to use Google tracking

     
    Post new topic   Reply to topic    ClickBankSuccessForum.com Forum Index -> Marketing ClickBank Products
    View previous topic :: View next topic  
    Author Message
    JeffreyL



    Joined: 21 Jul 2004
    Posts: 5

    PostPosted: Sun Nov 28, 2004 6:24 am    Post subject: My CB affiliate wants to use Google tracking Reply with quote

    Hello Group,

    I have an affiliate who would like to use Google Ads to promote my program. They further want to be able to access google tracking stats.

    They have informed me that with a certain other CB program that they promotes, they are allowed to sign up and include the Google Ad ID, and it will allow them to have the tracking code place on the thank you page. Thereby letting them view stats by keyword/conversion.

    I checked it out and seems this is being done via a cgi script.

    My question... any ideas what program(s) they might be using?


    Thanks in advance.
    _________________
    Jeff Staniforth, Motivational Success Mentor. - 10-Minutes A Day To Start Living The Life
    of Your Dreams...
    Web: www.affirmware.com.au
    Back to top
    View user's profile Send private message
    WayneB



    Joined: 21 Oct 2004
    Posts: 960

    PostPosted: Sun Nov 28, 2004 2:02 pm    Post subject: Reply with quote

    Google Adwords gives you tracking code which you can use to track
    your sales. All you would have to do is add his tracking code to the
    thank you page, and then he would be able to tell which of his keywords
    are producing the sales. When the visitor clicks on his ad on Google,
    it would set a cookie on their computer, and then when they purchase
    and go on to the thank you page, the tracking code would pick up his
    cookie and show it as a sale in the affiliates account. I've gotten a
    couple merchant's to do this for me also, it does really help with
    optimizing our advertising budget.
    Back to top
    View user's profile Send private message
    JeffreyL



    Joined: 21 Jul 2004
    Posts: 5

    PostPosted: Sun Nov 28, 2004 8:58 pm    Post subject: Re: Google Adwords tracking code Reply with quote

    Hi WayneB,

    Thanks for your feedback.

    I realize I could do this manually, but the site I found that was doing this had it set up so it would do it automatically. You see, I want to offer this feature to all affiliates, not just this one person.

    I am guessing the site in question was somehow modifying the "Thank You" page and inserting the appropriate Google tracking ID, based on "who knows how it did it", but it appears that it could somehow identify the visitor as a signed up affiliate, and retrieve the Google ID from its database and create the "Thank You" page on the fly.

    Well, I am guessing this is what it is doing.

    I did try writing to the site in question, let see if I get a reply:-)

    Thanks for your feedback.
    _________________
    Jeff Staniforth, Motivational Success Mentor. - 10-Minutes A Day To Start Living The Life
    of Your Dreams...
    Web: www.affirmware.com.au
    Back to top
    View user's profile Send private message
    credog



    Joined: 28 Nov 2004
    Posts: 51

    PostPosted: Mon Nov 29, 2004 1:27 am    Post subject: Just write the php script Reply with quote

    Check for the cookie on the landing page place the correct conversion code to match it on the thank you page.
    Back to top
    View user's profile Send private message
    JeffreyL



    Joined: 21 Jul 2004
    Posts: 5

    PostPosted: Mon Nov 29, 2004 6:01 am    Post subject: Just write the php script Reply with quote

    Thank for feedback.

    You say just write PHP script.

    It appears I would need a database where I would have to retrieve the affiliates Google Ad ID. Not sure it is as easy as you seem to think.

    Or perhaps it is, and you could offer clearer direction on how to do this.

    I am not a programmer, though can get my head around logic.


    Regards
    Jeff
    _________________
    Jeff Staniforth, Motivational Success Mentor. - 10-Minutes A Day To Start Living The Life
    of Your Dreams...
    Web: www.affirmware.com.au
    Back to top
    View user's profile Send private message
    astracker



    Joined: 07 Jun 2004
    Posts: 253

    PostPosted: Thu Dec 02, 2004 2:48 am    Post subject: Reply with quote

    I just threw this code together to give you an idea of how it would work. It should work, but bare in mind that I have not tested it.

    Put this code on your landing page where the ClickBank affiliate sends the visitors:

    Quote:

    <?php
    #### IMPORTANT--Put this code above EVERYTHING else.
    #### It will fail if ANY TEXT is sent to the browser
    #### before this code (the cookie header must be
    #### written first).
    $i = strpos($_SERVER["QUERY_STRING"], "hop=");
    if($i){
    # An affiliate sent the visitor. Write a cookie.
    $i+=4;
    # Get clickbank id from the query string.
    $affiliate = substr($_SERVER["QUERY_STRING"], $i, strlen($_SERVER["QUERY_STRING"])-$i);
    # Set a cookie on the visitor's computer to
    # identify him as coming from this affiliate
    # for the next 365 days.
    setcookie("clickbankid", $affiliate, time()+31536000)
    }
    ?>


    That code sets a cookie on the visitors machine for your site that stores the ClickBank ID of the affiliate who sent the visitor.

    Put this code on the bottom of your Thank-You page:

    Quote:

    <?php
    ### Put this code on the sales page.

    # Fill this array with your affiliate IDs and their
    # AdWords IDs (you need only do this for those
    # affiliates who want to track conversions, of course).
    # Array is in the form: $affiliates[CLICKBANK_ID] = ADWORDS_ID
    $affiliates = array();
    $affiliates["clickbankid"]= "0123456789";
    $affiliates["affiliate2"]= "9876543210";
    $affiliates["anotheraff"]= "5557776662";

    if(isset($affiliates[$_COOKIE["clickbankid"]])){
    # The amount of commission the affiliate is getting for this sale.
    $commission_amount = 50.00;

    # The affiliate's Google AdWords ID (which you would pull from a database).
    $adwordsID = $affiliates[$_COOKIE["clickbankid"]];

    echo <<<EOT
    <script language="javascript">
    commission = $commission_amount;
    <!-- Google Conversion Code -->
    <!--
    google_conversion_id = $adwordsID;
    google_conversion_language = "en_US";
    google_conversion_value = commission;
    google_conversion_label = "Purchase";
    -->
    </script>
    <script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <a href="https://services.google.com/sitestats/en_US.html" target="_blank"><img height=27 width=135 src="https://www.googleadservices.com/pagead/conversion/$adwordsID/?value=$commission_amount&amp;label=Purchase&amp;hl=en">
    </a>
    EOT;
    }
    ?>


    That code kicks out the Google Tracking code only if the affiliate who sent the visitor is in the affiliate array with an AdWords ID assigned.

    I hope this makes sense.
    _________________
    Expert Quality Articles In Minutes!
    Write top-quality articles faster than you dreamed possible! 3.95% conv. (5/28/07).Fantastic reviews.
    Back to top
    View user's profile Send private message
    jnm



    Joined: 01 Dec 2004
    Posts: 4

    PostPosted: Thu Dec 02, 2004 8:34 pm    Post subject: forgot Reply with quote

    You forgot a ; after setcookie("clickbankid", $affiliate, time()+31536000) in the first chunk of code.


    I was looking for something like this myself. Thanks!
    Back to top
    View user's profile Send private message
    JeffreyL



    Joined: 21 Jul 2004
    Posts: 5

    PostPosted: Thu Dec 02, 2004 8:42 pm    Post subject: Re: PHP code Reply with quote

    Hi Guys,

    Thanks a lot, your feedback has been most appreciated. Though a tad over my head.

    I might get an eLance/Rent-a-Coder to get it working for me, but sure you guys have done quite a big part of the work.

    Any ideas what a fair price might be to have a programmer get it work?

    Regards
    Jeff
    _________________
    Jeff Staniforth, Motivational Success Mentor. - 10-Minutes A Day To Start Living The Life
    of Your Dreams...
    Web: www.affirmware.com.au
    Back to top
    View user's profile Send private message
    Display posts from previous:   
    Post new topic   Reply to topic    ClickBankSuccessForum.com Forum Index -> Marketing ClickBank Products All times are GMT
    Page 1 of 1

     
    Jump to:  
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum


    Clickbank Success Forum Featured Links.

  • Free - ClickBank Guide
  • Create 3D eCovers Right In Your Browser!
  • To see how your message can be featured, Click here.


    Powered by phpBB © 2001, 2005 phpBB Group

    ClickBank for Newbies

    A free book - no sign-up required.

    The Ultimate SuperTip

    The GREATEST viral marketing idea of all time

    In a FREE book

    The World's Best Ad Tracker ?

    The man who wrote the only book about ad tracking thinks it is . . .