Jump to content

jennec

Members
  • Content count

    1
  • Joined

  • Last visited

Profile Information

  • Real Name
    Jenne Claessens
  1. Hey all, I have a problem with my refferals in PPC. If I look in the above corner of de adwords campaign is see: total refferals 27. I have 2 search words and after each words stands by refferals 1 so this doesn't match. And when I try to follow the link he counts 1 refferal more at the total but not with the words seperate. Can someone please help me? My code is below: <-unnessecary coding deleted for this post-> $ppc = array ('google' => array ('title' => 'Google België 01 sexshop', 'keywords' => 'seksshop:seksshop,erotische:erotische,sex_shop:sex shop,erotica:erotica,erotheek:erotheek,erotiek_shop:erotiek shop,sexshops:sexshops,sex_shops:sex shops,erotisch:erotisch,sexshop:sexshop,erotiekshop:erotiekshop,erotika:erotika, seks_shop:seks shop,sexwinkels:sexwinkels,sexwinkel:sexwinkel,erotiekshops:erotiekshops,erotiek winkel:erotiekwinkel,eroteek:eroteek,erotiek_be:erotiek be,erotiekwinkels:erotiekwinkels,erotiek_nl:erotiek nl,seks_shops:seks shops,erotisme:erotisme,erotiekpagina:erotiekpagina,erotieksites:erotieksites,er otieksite:erotieksite,erotieklink:erotieklink,erotieklinks:erotieklinks,sexschop: sexschop'), 'google1' => array ('title' => 'Google België Porno', 'keywords' => 'porno_films:porno films,sex_dvd:sex dvd,pornofilm:pornofilm,pornodvd:pornodvd,erotiek_film:erotiek film,erotiek_films:erotiek films,private_dvd:private dvd,erotiekfilm:erotiekfilm,sexdvd:sexdvd,erotiekfilms:erotiekfilms'), 'google2' => array ('title' => 'Google België Lingerie voor haar', 'keywords' => 'sexy_lingerie:sexy lingerie,panty:panty\'s,string:string,nylon_kousen:nylon kousen,bh:bh,slipjes:slipjes,sexylingerie:sexylingerie,erotische_lingerie:erotis che lingerie,netkousen:netkousen,sexy_strings:sexy strings,catsuit:catsuit,sexy_pantys:sexy panty\'s,g_strings:g string,jarretellen:jarretellen,strings:strings,sexy_schoenen:sexy schoenen,sexy_slipjes:sexy slipjes,lingerie_erotiek:lingerie erotiek,nachtkleed:nachtkleed,sexy_slipje:sexy slipje,catsuits:catsuits,sexy_laarzen:sexy laarzen,sexy_jurkjes:sexy jurkjes,sexy_catsuit:sexy catsuit,tepel_juweel:tepel juweel,luxe_lingerie:luxe lingerie,lingerie_erotisch:lingerie erotisch,vrouwen_string:vrouwen string,kimono:kimono,vrouwen_strings:vrouwen strings,nachthemd:nachthemd,sexy_bodys:sexy body\'s,erotische_lingerie_online:erotische lingerie online,nightdress:nightdress,sexy_kimono:sexy kimono,bhs:bh\'s,lederen_laarzen:lederen laarzen,babydoll_string:babydoll & string,babydollmetstring:babydoll met string,bh_setjes:bh setjes,corsage_setje:corsage setje,diamand_tattoo:diamand tattoo,erotische_lingerie_voor_haar:erotische lingerie voor haar,jarretellen_set:jarretellen set,jarretellen_setjes:jarretellen setjes') ); //Set the following to true to enable the PPC referrer report //Eventually, this will probably be moved into the configuration menu //in admin, where it really should be! define ('SUPERTRACKER_USE_PPC', true); // ********** PAY PER CLICK CONFIGURATION SECTION EOF ************ <-unnessecary coding deleted for this post-> //PPC Summary report if ($HTTP_GET_VARS['special'] == 'ppc_summary') { echo '<table width="100%" border=0 cellspacing=0 cellpadding=5 style="border:1px solid #000;">'; foreach ($ppc as $ref_code => $details) { $scheme_name = $details['title']; $keywords = $details['keywords']; $ppc_q = "SELECT * from supertracker where landing_page like '%ref=" . $ref_code . "%'"; $ppc_result = tep_db_query ($ppc_q); $ppc_num_refs = tep_db_num_rows($ppc_result); echo '<tr><td colspan="4" style="font-weight:bold;text-decoration:underline;">' . $scheme_name . '(ref='.$ref_code.') - Totale Verwijzingen ' . $ppc_num_refs . '</td></tr>'; // display headings echo '<tr class="dataTableHeadingRow"><td class="dataTableHeadingContent"> (referentie):Zoekwoord</td>'; echo '<td class="dataTableHeadingContent">Verwijzingen</td><td class="dataTableHeadingContent">Gemiddelde tijd</td><td class="dataTableHeadingContent">Gemiddeld aantal kliks</td>'; echo '<td class="dataTableHeadingContent"># Aangekocht</td><td class="dataTableHeadingContent">Conversie</td>'; if ($keywords != '%') { $keyword_array = explode(',',$keywords); foreach ($keyword_array as $key => $val) { $colon_pos = strpos ($val, ':'); $keyword_code = substr($val,0,$colon_pos); $keyword_friendly_name = substr($val,$colon_pos+1,strlen($val)-$colon_pos); $ppc_key_q = "SELECT *, count(*) as count, AVG(num_clicks) as ave_clicks, AVG(UNIX_TIMESTAMP(last_click) - UNIX_TIMESTAMP(time_arrived))/60 as ave_time from supertracker where landing_page like '%ref=" . $ref_code . "&keyw=" . $keyword_code . "%' group by landing_page"; $ppc_key_result = tep_db_query($ppc_key_q); $ppc_row = tep_db_fetch_array($ppc_key_result); $ppc_key_refs = $ppc_row['count']; // conversion data $ppc_key_p_sql = "SELECT COUNT(*) as conversions FROM supertracker where landing_page like '%ref=" . $ref_code . "&keyw=" . $keyword_code . "%' and completed_purchase='true'"; $ppc_key_p_array = tep_db_fetch_array(tep_db_query($ppc_key_p_sql)); if ($ppc_key_p_array['conversions'] == 0) $conversion_rate = 0; else $conversion_rate = ($ppc_key_p_array['conversions']/$ppc_key_refs)*100; //test echo '<tr class="dataTableContent"><td>('.$keyword_code.'):'.$keyword_friendly_name.'</td>'; echo '<td> '.$ppc_key_refs.'</td><td> '.number_format($ppc_row['ave_time'],2).'</td><td> '.number_format($ppc_row['ave_clicks']).'</td>'; echo '<td> '.$ppc_key_p_array['conversions'].'</td><td> '.number_format($conversion_rate,2).'%</td>'; } } } echo '</table>'; }//End PPC Summary Report
×