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

Sizing question on iFraming

Discussion in 'Black Hat SEO' started by Cash1t, Oct 26, 2012.

  1. Cash1t

    Cash1t Registered Member

    Joined:
    May 27, 2009
    Messages:
    78
    Likes Received:
    36
    I have a two page offer that I want to put in an iFrame. The section I want to frame on the first page is smaller in size than the section I want to frame on the second page. Once the info is input on the first page and a click is made to go to page two, the frame is smaller than the section of the page I need to show.
    How can I get the second page iFrame to show more than the first page?
     
  2. Cash1t

    Cash1t Registered Member

    Joined:
    May 27, 2009
    Messages:
    78
    Likes Received:
    36
    OK. Did I ask a stupid question? I looked and have searched and can't find an answer (as of yet).
    1. I have an offer that's two pages.
    2. First page requires name/email/confirm/click - Once this is done it goes to the second page for the complete form to fill in with information.
    3. I create an iframe for the first page to exclude all the remaining page info EXCEPT for the small form to input name/email/confirm/click
    4. After the first page info is filled in and clicked it goes to the second page but the iframe sizing is off because the iframe is set for the first page content I want to display.
    What do I do to maintain the smaller size on the first page - yet have it be a larger iframe size on the second page to display the extra content there?
    Thanks.
     
  3. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    You would need to have a function that checks to see when the page has been submitted. This can be done by checking the length of the browser's history. When the browser's history is increased, it means the page has been submitted.

    For example, say when your user loads the the first page, their history length is 8. So when they submit the first page and load the second page, the history length is now 9. That's when you know when to change the frame size.

    However, what to do from there depends on how you're iframing. Cakeslicing, for example, uses the "top" and "left" CSS attributes. GODcpa uses window.scrollTo and some other mumbo jumbo (don't quite remember).

    In code, tracking when the user completes the first page looks like this:
    Code:
    <script type="text/javascript">
    function checkHistory() {
         if (history.length > initialHistory) { // if current history is > than start history
              // change iframe size
         }
    }
    
    $(document).ready(function() {
         var initialHistory = history.length; // store user's starting history length;
    
         setInterval("checkHistory", 1000); // check the history length every 1 second or 1000 milliseconds
    });
    </script>
    
    So all you need to do from there is implement the code to change the iframe size and positioning. Hopefully you can figure out how to do it.

    Code:
    <script type="text/javascript">
    function checkHistory() {
         if (history.length > initialHistory) { // if current history is > than start history
              // change iframe size
              // GODcpa-ish style (not exactly sure)
              $("#myIframe").css("width", "300px"); // change width of iframe to 300px
              $("#myIframe").css("height", "800px"); // change height of iframe to 800px
              $("#myIframe").scrollTo(30,40); // scroll to new position of 30x 40y
    
              // Cakeslice style
              $("#myIframe").css("width", "300px"); // change width of iframe to 300px
              $("#myIframe").css("height", "800px"); // change height of iframe to 800px
              $("#myIframe").css("top", "-304px;"); // set top relative position to -304px
              $("#myIframe").css("left", "-404px;"); // set left relative position to -304px
         }
    }
    
    $(document).ready(function() {
         var initialHistory = history.length; // store user's starting history length;
    
         setInterval("checkHistory", 1000); // check the history length every 1 second or 1000 milliseconds
    });
    </script>
    
    You will likely need to look into your current code to see how exactly the frame and positioning are specified. Modify the code from there. You will need jQuery to use the functions I used.

    The numbers I used are just random. You could always frame the second page of your offer, then see how your iframe code differs from the first iframe. That way, you know which elements affect the iframes size/positioning, and you can write code to implement those variables correctly.
     
    • Thanks Thanks x 2
    Last edited: Oct 28, 2012
  4. Cash1t

    Cash1t Registered Member

    Joined:
    May 27, 2009
    Messages:
    78
    Likes Received:
    36
    Hey thanks Artizhay. That was what I needed. Now I need to study up so I can implement it. Great save, I really do appreciate it!
     
  5. creativepotion

    creativepotion Regular Member

    Joined:
    Jun 23, 2012
    Messages:
    305
    Likes Received:
    19
    I dont mean to hijack this thread, but I do see my question very related. (OP: Sorry, if you feel uncomfortable about this question, let me know and I will delete this post)
    I am kindda in the same situation whereas I have a offer page with sign up.

    I am wondering if there is a way to cloak my iframe code so that people wont see my code when they view pagesource?

    For example:
    <iframe>www.abc.com/offer=123&aff=123&asfasfasfaf2142141</iframe>

    To something like
    <iframe>www.xyz.com</iframe>

    Kind of like shortening it, so that my competitors wont ever find any clue which network i am with etc.
    Thx
     
  6. Cash1t

    Cash1t Registered Member

    Joined:
    May 27, 2009
    Messages:
    78
    Likes Received:
    36
    @CreativePotion, naw I don't mind. For Wordpress I do this: I create a page with a META REFRESH to my offer URL (with a blank template). Then I substitute the page (I created) URL and put that as the link for the offer. When someone scrolls over they see the created page URL. I'm sure there are other ways and maybe some of the more experienced coders, like artizhay can offer some suggestions.
     
  7. creativepotion

    creativepotion Regular Member

    Joined:
    Jun 23, 2012
    Messages:
    305
    Likes Received:
    19
    Thanks.
    I was actually thinking the same thing.
    I havent tried as I am a little concern. Just curious if that will cause any tracking issue?

    Looking for more ideas :)
     
  8. Cash1t

    Cash1t Registered Member

    Joined:
    May 27, 2009
    Messages:
    78
    Likes Received:
    36
    So far no tracking issues with the company I work with.
     
  9. creativepotion

    creativepotion Regular Member

    Joined:
    Jun 23, 2012
    Messages:
    305
    Likes Received:
    19
    Thanks for the info;

    Since we are discussing about iframe here, another question just hit my mind.
    Beside using your network's tracking, is there a way to track how many actually converts using Google Analytics and such?

    I really want to know more about my sales page, so that I can optimize it even further according to data and stats.
     
  10. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    In the end, the user has to get to your offer URL. Cloaking it and redirecting it 50 times may make it harder, but eventually that URL has to be read by the browser in order to load, so the URL will be visible eventually, even if your competitor has to do some digging through your redirects. Things like that can't be hidden.

    As far as tracking with Google Analytics, you can use the history checker function I posted above, but whenever the history has been increased by a certain amount (by 1 for first-page conversions, by 2 for second-page, etc.), you can use the Google Analytics Javascript API to track the conversion.
     
  11. creativepotion

    creativepotion Regular Member

    Joined:
    Jun 23, 2012
    Messages:
    305
    Likes Received:
    19
    Oh I see. I guess at least this will make it harder for him to trace offer/network.
    He wouldnt be able to do it with view pagesource alone, and will need to analyze each redirect/hop i guess...

    This sounds very complicated. Is there any guides I can read on about this?

    So let say if my offer is "acne cream" samples

    1. User see my landing page with iframe
    2. User selects acne cream package
    3. User gets redirected to official acne cream site, and enter shipping info
    4. User gets to thank you page (on the official ance cream site) <-- which is beyond my control

    So in this case... how will the javascript API works. How is it able to detect if the user really went all the way to the thank you page...
     
  12. artizhay

    artizhay BANNED BANNED

    Joined:
    Nov 21, 2010
    Messages:
    1,867
    Likes Received:
    1,335
    The trick would be to keep the user always on your domain, so you can run the history check function. If they ever fully leave your site, then you can't track anything. You can use full-page framesets to emulate a full web page.

    As far as tracking, you can read up on the GS JS API at https://developers.google.com/analytics/devguides/reporting/core/v3/ and https://developers.google.com/analytics/devguides/reporting/mcf/v3/

    I can't write out exactly how to do it because that would take a lot of time I don't have lol. My company could always help you implement this. :p
     
    Last edited: Oct 28, 2012