How do I get ad links to open in a new window
Hello,
Is there an ability to set _blank as the default for an ad zone, so when someone clicks on the ad it opens in a new window?
If there is, I'm not seeing it.
Thanks!
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Niyi on 15 Mar, 2011 10:23 PM
To get ads to show in a new window, add the following code before your final ad call i.e. FetchAds();
3 Posted by mmcomber on 16 Mar, 2011 07:33 PM
Thank you! I placed the script right about the final call in my footer. (I
used the advanced tag set up). All of the ads in my sidebar now open in a
new window. Strangely, though, the ad in the masthead of the site still
opens in the same window.
Thoughts?
On Tue, Mar 15, 2011 at 3:23 PM, Niyi <
***@tenderapp.com> wrote:
4 Posted by mmcomber on 16 Mar, 2011 10:24 PM
Sorry, just noticed another issue. Turns out that when I added the code,
those sidebar ads no longer appeared in IE 8, but displayed fine in Firefox.
Thoughts?
Support Staff 5 Posted by Niyi on 18 Mar, 2011 07:52 PM
I noticed the first two ad calls on your page are
TS_AdService.DisplayZonewhilst the rest areTS_AdService.CreateZonecalls.This will explain why the ad in the masthead didn't use the target frame. The DisplayZone call fetches the ad immediately before the target frame was set.
Can you try replacing all the ad calls with CreateZone instead?
6 Posted by mmcomber on 18 Mar, 2011 08:40 PM
Thanks for catching that. Not sure why the code was different.
In implementing your original suggestion, I found that if I placed the code
before the final ad call, it worked in Firefox (ads opened in a new window),
but the ads did not display at all in IE8. However, if I replaced the final
ad call with that code, it worked just fine on both platforms.
Is this the right approach? Is having a separated final ad call necessary?
Thanks,
Marty
On Fri, Mar 18, 2011 at 12:52 PM, Niyi <
***@tenderapp.com> wrote:
Support Staff 7 Posted by Niyi on 22 Mar, 2011 01:12 PM
Hi Marty,
When you have multiple ads on a single page, we recommend that you use the
TS_AdService.CreateZonecalls followed by a singleTS_AdService.FetchAdscall.The former defines the position of the ads whilst the latter makes the actual call to fetch all the ads. It's faster, more efficient, speeds up page loads, and reduces conflicts.
8 Posted by veepiz on 23 Mar, 2011 05:55 AM
original question... except that i use iframes
Niyi closed this discussion on 23 Mar, 2011 11:52 AM.
mmcomber re-opened this discussion on 25 Mar, 2011 11:14 PM
9 Posted by mmcomber on 25 Mar, 2011 11:14 PM
Sorry, Niyi, but I'm slightly confused.
here's basically what I have in order for calls on my page:
In my <head> I have:
<script src="http://ads.trafficspaces.net/v1.22/adservice.js"
type="text/javascript"></script>
On the main page I have eight calls for separate ad zones, similar to this
one:
<script
language="Javascript">TS_AdService.CreateZone("MDEyMzQ0MTYxNTQzMjE=");</script>
And then in the footer I have the code you suggest for opening the ads in a
new broswer:
<script language="Javascript">
TS_AdService.targetFrame = "_blank";
TS_AdService.FetchAds();
</script>
My question is under this last bit of code, do I need to add this:
<script language="Javascript">TS_AdService.FetchAds();</script>
Or can I leave that out?
On Tue, Mar 22, 2011 at 6:12 AM, Niyi <
***@tenderapp.com> wrote:
Support Staff 10 Posted by Support Guru on 01 Apr, 2011 02:16 PM
There should only be one call to
TS_AdService.FetchAds()so adding it again is unnecessary.Support Guru closed this discussion on 01 Apr, 2011 02:16 PM.
mmcomber re-opened this discussion on 01 Apr, 2011 06:52 PM
11 Posted by mmcomber on 01 Apr, 2011 06:52 PM
Thanks much. That's what I figured.
On Fri, Apr 1, 2011 at 7:16 AM, Support Guru <
***@tenderapp.com> wrote:
Support Guru closed this discussion on 02 Apr, 2011 01:40 PM.