How to iframe an affiliate offer

iframe featured

Although I always suggest that PeerFly publishers learn how to create their own landing pages, it’s not always necessary. Direct linking is also common practice among affiliate marketers. Instead of creating a landing page and directing traffic to the offer through that, you simply use your affiliate link (Short Link or Long Link on PeerFly) and send the visitor directly to the offer. In some cases though, the company you are using to promote the offers will not allow you to use a direct affiliate link. For example, Facebook does not allow PeerFly publishers to directly link our offers using the affiliate link. So, what can you do if this is the case? IFrame it!

IFraming an affiliate offer

With PeerFly, you are more than welcome to iframe any offer we have as long as it is not specifically restricted in the Marketing Restrictions. Also, you need to iframe 100% of the offer landing page. I will explain and demonstrate this below, but it’s important to remember. But, what exactly is an iframe?

It’s an HTML element that allows to to frame a document within a document or a webpage within a webpage. In the example below, I take my affiliate link and place it within ipad2.html to make it look like ipad2.html is actually the affiliate offer page.

iframe example

HTML to iframe an affiliate offer

The HTML for iframing is actually very simple.  You can find the source for my sample page at:

You can view what it will look like here:

It is important thing to remember is to remove the page margin, which I did in the example within the <style> tags. You can remove all other margin and borders with frameborder=”0″, marginheight=”0″, and marginwidth=”0″ otherwise the page framed will look funny. Make sure you keep the width and height of the iframe at 100% as well. Of course, change the links to the pages being iframed (my short links) to your own unless you want me to get credit for your traffic.

That pretty much explains how to iframe a CPA offer. Please let me know if you have any questions.

108 Responses to “How to iframe an affiliate offer”

  1. I sent you an email about this not 5 minutes ago. I didn’t see this post, you seem to be blacklisted on your demo page :)

    I just need to figure out where to put the header image, guessing you can just edit this in notepad and then name it whatever.html then upload it to server?


      • Luke -

      haha, I forgot that I used that offer in my demo. As I mentioned, everyone gets blacklisted :p

      What header image are you talking about?

  2. Wow, I didn’t think anyone was allowed to iframe an offer. :O
    This will open up a whole new way of making money with PeerFly.

    • Luke -

    I updated the example code for a different iPad offer that I’m not blacklisted on :P

    • ANdy -

    Thanks Luke your the best affiliate manager ever :)

      • Luke -

      No problem :)

    • Satria -

    Thanks Luke,

    Can I track an iframe site with google analytics or any tracking services?..Just want to know hows it works :D

      • Luke -

      Yes, you can simply copy and paste your tracking code right before the on the iframe page :)

      • Luke -

      I have gotten this to work myself before, but I’m not sure if they necessary like it.

    • Shawnta Battle -

    Where you do copy and paste the tracking code on the iframe page. I missed something. Thanks :)

      • Luke -

      Just copy and paste your Short Link into the link area on the iframe tag :)

    • Umair -

    what about adword..?? is this is working on it..???

      • Luke -

      You’d just have to try. I’ve had some approved.

    • Niko -

    Hi! What about iframing with fb pages and apps? They will be iframe resized, but with scroll bars, is that allowed?

      • Luke -

      You are not allowed to iframe our offers on Facebook.

    • Kelvin -

    I am still perplexed about this whole iFrame thing.

    Let’s say I want to promote offer 3324 (Johnson’s baby kit)…..

    What do I do ?? Please help.

    • Gary -

    Last I heard, Facebook still allowed the like pages. Can you put a standard Peerfly link in one of those? I have some really good ideas using Facebook!

      • Luke -

      You cannot iframe our offers on a fan page if that is what you are asking.

    • Gary -

    If that be the case, can I still redirect people to a page FROM FB, but yet not ever show a Peerfly link ON FB? I can do it that way, if allowed, and still almost seamlessly integrate the offer with another page. A little HTML and scripting, and that shouldn’t be a problem.

    • Ibrahim -

    I do not understand what you mean by saying ” You cannot iFrame our affiliate offers”. Can I iFrame my landing page on facebook or am I just allowed to put the link to my landing page on my facebook page.

      • Luke -

      You are not allowed to iFrame our offers directly on Facebook. The only Facebook promotion we allow are paid Facebook Ads. I am talking about iFraming the offer on your own host (HostGator suggested) and then using that link to promote the offer on Facebook Ads.

    • novri -

    Hi, Luke thank you for this information,I’ve promoted by PPV networks but my shortlink was rejected,because it contained frame breaking script, how do I fix this?

    • Jahider -

    Hi Luke, thanks for the great info, just one question:
    For iframe, Can i use mi tracking link to replace the short or long link that peerfly provides?

      • Luke -

      Yes, you could iFrame your tracking link as long as that redirects to the PeerFly short link or long link.

    • Hao -

    Is it allowed to iframe part of the Peerfly landing fage,just like email form?

      • Luke -

      No, you must iframe 100% of the landing page.

    • sayed -

    Hi luke thanks for the info i almost got it but need some more instructions
    is there is any step by step to show me how i can iframe a website

      • Luke -

      It’s pretty much explained in the code. If you do some Google searches you can find more information.

    • masprisimo -

    hi luke, can I promote some offer with facebook page use this methode (iFrame)

      • Luke -

      No, you cannot promote our offers directly on Facebook.

    • BigGenius -

    Alternatively, you can use

    To make sure you keep the width and height of the iframe at 100%

      • Luke -

      Your code didn’t show up in your comment.

    • BigGenius -

    Sorry, but my code line is not appearing. {iframe seamless=”seamless”}

    Replace “{}” with “”

    • Syd -

    Luke I tried Facebook’s paid ad. with PeerFly’s direct offer link and it was rejected, other than iFraming do you think redirecting a domain name to the affiliate link would work?

    • Arie -

    Just joined peerfly 2-3 days ago,

    this information will be useful for a newbie like me! keep posting , Luke!

    • Hopeton -

    Tried your Iframe script on ADF.LY and was rejected. They saying that script break frame which against there rules. Still dont understand why

      • Luke -

      1. You do not need to iframe if you are going to advertise using
      2. If the frame is being broken it’s by the advertiser’s landing page, not the iframe. You cannot iframe said offer and you cannot promote it on because of that.

      We do not suggest promoting our offers at PeerFly on because the traffic simply does not convert well and overall, the response from our advertisers after receiving traffic from has not been good.

    • mambo -

    thanks for this important information, there I want to ask:
    As we know, almost all the offers don’t allow us to use direct visitors from twitter (I do not know why). Can I use this iframe for twitter traffic?
    Like this:
    Twitter traffic => My own landing page with iFrame

      • Luke -

      We don’t allow directly linking on Twitter because Twitter considers it spam. This would probably be fine as long as you are not massively tweeting it across multiple accounts.

    • TP -

    Luke my question is similar to Mambo’s. Twitter traffic as you stated is not allowed because Twitter considers it spam. But is it allowed to drive twitter traffic to ones own landing page(with or without iFraming) and then to the CPA offer. ie

    Twitter traffic=> Own Landing Page(with or without iFraming)=> CPA Offer.

    Similarly what is the position with regard to Pinterest ie

    Pinterest traffic=> Own Landing Page(with or without iFraming)=> CPA Offer.

    • rinto -

    Thanks Luke! Does this iframe code work for any browser?

      • Luke -

      It should work with all browsers. Please let me know if anyone knows otherwise.

    • Dave -

    I don’t have a lot of experiance with html. Is there a step by step video on you tube or can i ask somebody to do this for me?

      • Luke -

      No, you simply need to copy and paste the HTML code into a new file on your server (need hosting?) and then change it to your affiliate link.

    • Randy -

    Just got rejected by facebook, and did a google search, landed me back here. I’m pretty sure this is the best resource. Thanks again Luke.

      • Randy -

      After doing this, I got my fb ad approved shortly after this. :) It really works.

    • khairul -

    hello, luke
    awesome, i got my ad approved!

    Campaign Reach?
    Social Reach?


    these was the statistics. before suggested bid was $1 to $1.72 but now its $0.51 – 1.11 USD. should i edit my bid to $0.51? or how i can get lower cpc?

      • Muhammed -

      Hi Khairul, I guess you are from Bangladesh. If you are, Could you please contcat me @01754076861 . I am asking Because I wan to know how you get approved!

    • Sam -

    Hey Luke for soem reason after i framing my conversion pixel from propser202 is not firing. ex I have domain as iframe domain my postback pixel is

    • Keith -

    Thanks Luke, this is good information.

    • Muhammed -

    Hi Luke, I am a newbie, Could you please let me know how I can add this Tag to my existing word press blog? I have tried, But it comes as a post and a tiny scrolling page. This will really help me a lot. Please email me the process if you have little bit of time.


      • Luke -

      You would need to make a new HTML file and paste the code. It will not work within a WordPress page or post.

  3. Thanks Luke, but I am using custom domain (purchased on Blogger Platform), So basically my site works on blogger format, so could you please help me how I could iframe Peerfly offers om my site.

      • Luke -

      I do not believe that’ll work, but I may be wrong.

    • david -

    can someone out there do a video who can show how to successfully place this iframe script on thier own site with a peerfly offer? I hope to do this correct the first time. thanks.

    • Lollo -

    OOT: Your blog rocks!

    About the iFrame I was wondering to use it because whatever the user do on the merchant site, anyway he’s on our domain. So what about legal stuff?
    Moreover this can be resolved if there’s a way, when the user, as an example, subscribe to the dating offer, you can make him go to the merchant site and leave your domain. Is possible?


      • Luke -

      Thanks! When you have an iFrame everything performed within that iFrame loads in the iFrame, so it’s not possible to leave that iFrame from the user perspective unless the merchant site breaks the frame or opens a link in a new window.

        • Lollo -

        Hey Luke, thanks for reply.
        You’re right, I’ve tried a lot of different code ( javascript, jQuery ecc…) to try to alter the target meta in the merchant form site. In this way if a user submit the form, the new window is going to open in a new window. But there’s no way, and that’s correct, to alter a page loaded in an iFrame, even if you use a user side script.
        This is why I was wondering what’s happen to the legal stuff on the merchant site. Ex: ” I accept bla bla bla on … bla bla bla “… but the user is still on our domain :(

        OOT: on peerfly do you have also a good number of international offers? this because probably with my bad english grammar the US, UK, CA etc are not profit traffics for me.

    • Lis Gerhart -

    Hi Luke,

    I don’t quite understand the purpose of iframing. What is the need for iframing an offer when it goes to the same CPA offer page if it wasn’t iframed?


      • Luke -

      Some advertisers will not allow a direct affiliate link.

    • Jenetra -

    Hi Luke, I am actually a Peerfly publisher, but when I first started I had a hard time finding offers that I could promote on a social network, so I gave up for a while. I’m gonna try again and found this article as well as a response you posted on Warrior Forum about not posting direct links on Pinterest back in April 2012. Will this iFrame option work on a Pinterest account (or should this only be used for Facebook/Twitter)? Thanks much :-)

      • Luke -

      We do not allow our publishers to iFrame our offers on social networks unless they are running paid ads.

  4. Hi, Luke

    I’ve emailed you about a recent tragedy that happened to me, regarding account suspension.

    Please have a look at my submitted email to you.

    I’m really waiting to get a reply, as i was recently approved @peerfly

    Warmest Regards
    Muzammil Rafiq

      • Luke -

      You should contact Corey.

    • Axel -

    Hi Luke, I often use iframes and I’d have 2 questions to ask you:
    – where can I find a good disclaimer text in order to protect myself when linking/iframing aff links?
    – do you think that advertiser’s website TOS and Disclaimer could indirectly “protect” me?
    Thanks :)

      • Luke -

      I don’t see the need for a disclaimer text on an iFrame and have never used one myself. I don’t hide my information on my whois so if someone had an issue with a page I was iframing they could find my information and ask me to remove it.

    • jesus -

    I used your tool “Free iFrame Hosting ” with the keyword “Folgers” and my affiliate link and the link that generates me “” but it didn’t aimed at the capture page, sends me to a survey page why?

    P.S. I’m using a U.S. proxy

    • Salvesh -

    Hi luke i can iframe the offer page in too , right?

      • Luke -

      Yes, that would be fine.

    • Shailesh -

    Hii Luke,
    I want to ask if i have 50k-100k click in 1 day, then can i use iframe on shared hosting :)

      • Luke -

      It depends on what shared hosting plan you get.

    • Jason -

    A lot of peerfly offers ‘break’ out of the iframe. Even when using your service, the CPA offer still ‘breaks’ out of it making the iframe useless.
    Any work around for this?

    • Lis Gerhart -

    Hi Luke,

    Do PPC networks like Bing and Google allow Iframing?


    • Lis Gerhart -

    Just to clarify my previous comment. The reason why I thought of iframing is to avoid duplicate display/destination URL issue with Bing and Google. Will it work?


  5. Hi Luke:

    I sent you a message off your page above. I am having trouble what you are referring to about creating an iframe. I have the assumption that Peerfly and FB don’t mix? So, are you telling me to create a iframe code from a tab on either a fanpage or home page of FB to an offer… let’s say I have a dating offer… I create a squeeze page to entice dating enthusiast to that page which in tails leads them to a the “Thank you” page of which they can join the offer? Is that possible?


      • Luke -

      Replied to your email. The iFrame should be an external link and not within Facebook.

    • Vipul -

    Hi Luke,

    Thanks for the great tool. I am currently a Peerfly Pub. I am trying to use Iframing for one of the offers. Its a ledgen. The thing is, the leadgen on the original page is a “HTTPS”. In your experience, if my domain is on HTTP, will the leads go through safely from an HTTPS page?

    • Haris -

    Hey luke,
    your iframe is url, and you using lukepeerfly URL for Fb ads whereas your offer is about Ipad
    does the visitors not suspicious about URL ?
    do you get good converting result?
    please reply my question on email or on this article

    • Brandon -

    Hi Luke! How do i create my own service like yours? I mean with the domain name of because sometimes that i use your service i earn double because of that. Please help to build my own thanks a lot!

    • Sary -


    Please advise after following the instruction above. Yes the iframe for an offer is done but one thing is facebook is not approve my request the importance thing is facebook has disable my ads manager which i cannot do anything at all.

    This the message: we have paused your facebook payment account because we noticed some unusual activity.

    Here is my iframe link:

    Hope to hear from you soon


      • Luke -

      Facebook no longer allows the promotion of email submits.

    • Sary -

    Thanks Luke an email already send to you.

    • Saku -

    Thanks for this awesome info! and great site btw, Thumbs up big time !!!

    • JAN -

    please I would like to communicate with you via email, kindly reply me via my mail so that I can send my questions across to you, Thanks

      • Luke -

      If you emailed me I will take a look ASAP.

  6. Luke,

    I am a new member to your blog and to CPA offers in general.

    I wanto to advertise on Facebook but that Iframe think is something I do not understand..

    I mean do I have to copy the Iframe and paste it where? On facebook? On the sield that we link our advertisement?

    Unfortunately I find it very difficult to understand this…

    Is there any way you can do a video about iframe and Facebook ads?

    That would be great for * newbies * like me :)

      • Luke -

      You copy the iFrame code and paste it into an HTML file on your web hosting. If you don’t have hosting I recommend getting setup with HostGator and learning HTML :)

    • lynai -

    where can I find the HTML finle on cPanel? I am a new member, so I do not understand about this.

      • Luke -

      You can create and edit files in the File Manager on cPanel.

    • rayner -

    Hey Luke,its there anyway I could make it work fpr

      • Luke -

      I’ve never tried.

    • rayner -

    Thanks Luke it worked for my cpa offers. Please Luke where else can I promote my websites apart from facebook ads.

    • CodeMoney -

    Hi Luke,

    I am a newbie, I have created the separate HTML file but I am confused about where to upload this file. I have WP Blog, I tried uploading it into my home page it doesn’t came with 100% coverage. Please help with it. Where should I upload my files to?

      • Luke -

      You just need to go into your cPanel -> File Manager -> Create a new HTML File in public_html -> copy/paste -> Save/Upload

    • rayner6 -

    Thanks Luke, you’ve been amazing. Am having a slight problem with the iframe section.
    When I post the new iframed link to facebook it doesn’t show any image in the rectangular display box. Only , , and the new iframed url is displayed in a rectangular box. I want an image to be added to the rectangular display on facebook .
    I tried adding an image html in the head section but no image was still displayed in the rectangular box after posting it on facebook. See what I have been trying.


    * {
    margin: 0;
    padding: 0;
    body {
    margin: 0;
    padding: 0;


    • rick -

    Hey luke the html file u given in article and two links in body . Those links are affiliate url of offer or short links u generated. plz clear

      • Luke -

      Those are affiliate links.

Leave a Reply