1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Grabbing incoming keywords and print them out?

Discussion in 'Black Hat SEO' started by superman100, Mar 21, 2009.

  1. superman100

    superman100 Junior Member

    Feb 14, 2009
    Likes Received:
    I make money
    I really hope anyone with decent programming skills know how to do this.
    Please have in mind that i'm NOT asking anyone to do the job for me, I just need someone to point me in the right direction or provide me with some hints.

    What I want to do is get/save the keywords people are searching for and ending up on my website from. Then echo/print it on the same page.

    Let's say someone type in "Buying a new house in New York", and end up on my landing page about "Real Estate NY"-page.

    I want to save that specific keyword and the number of times it has occured and print it out like this:

    "Incoming keywords: Buying a new house in New York (3 searches), Another Keyword (12 searches), Another Keyword (15 searches).

    This INFO is easy to get from Google Analytics - which tracks both keywords, the number of times they have occured, AND which page the user land on when typing in the keyword, so it must be possible.

    But, google analytics doesn't allow me to do it on autopilot. I could, of course, do it manually every day, but with 1000's of keywords it's a bit of a hussle over the long run.

    I have seen other people doing the exact same thing, so it must be possible.

    Does anyone know how to do this? I would use mysql/PHP for the programming.
  2. dondeal

    dondeal Registered Member

    Mar 7, 2009
    Likes Received:
    I don't usually share any scripts I use because they usually take me HOURS and HOURS to find, and some tampering, to fulfill my needs.

    Do this:

    Make a php file and name it keyword-grabber.php, and save this code inside of it:

    $se $parse["host"];
    $raw_var explode("&"$parse["query"] );
    foreach (
    $raw_var as $one_var) {
    $raw explode("="$one_var);
    $var[$raw[0]] = urldecode ($raw[1]);
    $se explode ("."$se);
    switch (
    $se[1]) {
    $keywords $var['p'];
    $keywords $var['query'];
    $keywords $var['q'];
    Now we need to include this script and echo the keywords on to where ever you are trying to put them......put this:

    <?php include("keyword-grabber.php"); echo $keywords; ?>

    That should work. If it works give me some thanks.

    (Of course to properly test it, you will need to type a keyword that you rank for into google and come to your site through google.)
    Last edited: Mar 21, 2009
  3. dondeal

    dondeal Registered Member

    Mar 7, 2009
    Likes Received:
    Sorry, after re-reading your post, this script simply spits out the text that they typed into google. It doesn't save it to a database.

    Although, anyone with level 1 php knowledge could add a few lines to this code and save the keyword to a file ....but for me to provide that additional support that would cost, but I don't feel like doing that anyway ...too busy. (This only took me a few minutes to find in my collection and post for you. Unfortunately, php skills are in high demand right now and not many people are going to do anything semi-complicated for free involving php.)