Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    50
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Geotargeting Slowing Down Website?

    Lately I have had growing concerns with geotargeting. I'm not a pro PHP coder, so I am using a geotargeting script called MySimpleAds to help me geotarget ads/banners/links on my site.

    The Problem.

    I have noticed that the geotargetted ads/links are taking longer to load than they would if they were not geotargeted. I expected there to be a very small delay, but it does seem quite noticeable.

    I like to think that the script has been constructed well, so is this something that I should just expect? The script uses a MySQL database to identify which country a visitor is from.

    The Bigger Problem.

    Now I don't mind there being a slight (if somewhat noticeable) delay to deliver the ads, but there is a bigger problem.

    Whilst the scripts are working to be delivered, the rest of page will not load. As you can imagine, this can cause problems if the geotargeted ad is in a sidebar and above the content code, which means it takes longer for visitors to get to see the main area of a page.

    Possible Solution.

    To be honest, I am not sure how to get around this. The main thing I would like to achieve is to have the ads load on their own accord without affecting the loading of the rest of the page. So even if the ad takes a while to be delivered, the rest of the page will load without being affected by the ad.

    I have heard that I can call the script as an external page like Google adsense does, but I am not sure how this works or if it will.

    Any suggestions would be much appreciated.

    Thanks!

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,072
    Thanks
    2
    Thanked 320 Times in 312 Posts
    You could put the content in an iframe. The main page will load normally and the iframe will be fetched separately by the browser.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    50
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Okay thankyou.

    Is this the best sort of option, or would it cause any problems as far as SEO goes?

  • #4
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    iFrames or AJAX...

    iFrames requires a transitional doctype. I prefer by far strict doctypes, but if you can live with transitional ones... And it's probably the fastest solution.

    AJAX is not bad, but it relies on JavaScript. Since you are using some kind of ad serving app, it might be impossible to use that solution without modifying your app.

    IMHO AJAX would be faster and less content obstrusive. But it's also the "harder" to use.

    SEO wise, I don't know about iFrames and SEO (I doubt Google would index the iFrame content as part of your website if the iFrame content isn't on the same domain - ??). For the AJAX content, Google would not see that content since it's created by JavaScript, but the rest of the page would be fine.
    Last edited by AlexV; 12-05-2008 at 09:20 PM.

  • #5
    New Coder
    Join Date
    Jun 2008
    Posts
    50
    Thanks
    18
    Thanked 0 Times in 0 Posts
    Thankyou very much TheWolf1, very informative.

    If I knew more about AJAX I would look into that option, but I will go with the iFrame option for now. Seems like the best way to go about this.

    Thanks again.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •