House ads & adspeed

I’ve used a few different software applications with the house ads, most recently revive
https://www.revive-adserver.net
where I needed to add

<script async src="//servedby.revive-adserver.net/asyncjs.php"></script>

to a head tag, others needed similar tags

I’m trying out adspeed

and its working on two other sites I have without issue, not Discourse

This is the ad zone code placed in all three to deliver the ads

<!-- AdSpeed.com Tag 8.1 for [Zone] Sixguns_Home_Page -->
<script type="text/javascript" src="https://g.adspeed.net/js/asld.js" data-as-oid="29270" data-as-zid="132525"></script>
<!-- AdSpeed.com End -->

I hit up the support at adpseed and they even searched here but were no help,

Does anyone know of a simple fix to get these to display on Discourse?

Thank you

Is that the code to include the ad? How are you loading it?

Is the browser loading the remote script? Did you add g.adspeed.net to cors-origins?

1 Like

Yes, and this is how I have it loaded (just updated to an advanced code

<!-- AdSpeed.com Tag 8.1 for [Zone] Sixguns Home Top 728x90 -->
<script type="text/javascript">var asdate=new Date();var q='&tz='+asdate.getTimezoneOffset()/60 +'&ck='+(navigator.cookieEnabled?'Y':'N') +'&jv='+(navigator.javaEnabled()?'Y':'N') +'&scr='+screen.width+'x'+screen.height+'x'+screen.colorDepth +'&z='+Math.random() +'&ref='+escape(document.referrer.substr(0,255)) +'&uri='+escape(document.URL.substr(0,255));document.write('<ifr'+'ame width="728" height="90" src="https://g.adspeed.net/ad.php?do=html&zid=132525&oid=29270&wd=728&ht=90&target=_blank'+q+'" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0"></ifr'+'ame>');</script>
<noscript><iframe width="728" height="90" src="https://g.adspeed.net/ad.php?do=html&zid=132525&oid=29270&wd=728&ht=90&target=_blank" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0"><a href="https://g.adspeed.net/ad.php?do=clk&zid=132525&oid=29270&wd=728&ht=90&pair=as" target="_blank"><img style="border:0;max-width:100%;height:auto;" src="https://g.adspeed.net/ad.php?do=img&zid=132525&oid=29270&wd=728&ht=90&pair=as" alt="i" width="728" height="90"/></a></iframe>
</noscript><!-- AdSpeed.com End -->

With adspeed its a zone and you can place different ads in it, on my video site with the same code there are two ads being served, same with blog but no mobile there yet.

Was unaware of that but just gave it a try

Was hoping to mark solved but no go, however, I am now getting browsers to identify the attempt

image

image

so that got me closer :crossed_fingers: this means something simple to you?

See where it says “each origin must include http:// or https://”? I think it means it.

1 Like

:hugs: I think we may have hung out in the past :grin:

No help,
image

but going off a hunch with no idea what I’m doing I added the bottom line seen here

image

Which changed the console error

image

does that, other than I know nothing, mean anything?

First: I have spent most of my morning working on some problems that someone has had with ads and even after I did three very clever things, the problem has at least sort-of only gotten worse.

I’m glad that I thought you’d see the humor in my sarcasm.

Yes! That’s awesome! Now it would appear that the code is executing. I have spent many hours of my life modifying code that was not executing, so you’re really moving along.

So my idea appears to have been necessary, but not sufficient to solving your problem.

I guess maybe that php thing you’re calling spits out the asld.js file that it’s talking about.

Uh. Maybe? It means that somehow that script wants to know something about some owner and something is supposed to tell it and it’s not getting told. That something is probably in the part after the ? in the src= url in your image above.

4 Likes