Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript Please What is wrong with this script

Maxiel

Coder
HTML:
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<div id="gpt-300x250extra_5">
  <script>
    window.googletag = window.googletag || {cmd: []};
    googletag.cmd.push(function() {
      googletag.defineSlot('/21857590943,22790428796/buzzhint.com/buzzhint.com_300x250_5', [[336, 280], [300, 250]], 'gpt-300x250extra_5').addService(googletag.pubads());
      googletag.enableServices();  
      googletag.pubads().set('page_url', 'buzzhint.com');
      googletag.display("gpt-300x250extra_5");
    });
  </script>
</div>

I pasted it on my wordpress but it’s not displaying ads (the ads is from AdsVictory).
 
Last edited by a moderator:
HTML:
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<div id="gpt-300x250extra_5">
  <script>
    window.googletag = window.googletag || {cmd: []};
    googletag.cmd.push(function() {
      googletag.defineSlot('/21857590943,22790428796/buzzhint.com/buzzhint.com_300x250_5', [[336, 280], [300, 250]], 'gpt-300x250extra_5').addService(googletag.pubads());
      googletag.enableServices(); 
      googletag.pubads().set('page_url', 'buzzhint.com');
      googletag.display("gpt-300x250extra_5");
    });
  </script>
</div>

I pasted it on my wordpress but it’s not displaying ads (the ads is from AdsVictory).
Hi there,
Lets start with the basics... what is the value of window.googletag after you assign it there?
 
Last edited:
Hi 👋

AdsVictory is an ad network I signed up for, and I was given an ad tag to paste on my website which is not displaying and they don’t have solution to it as well. That why I paste it here for solution if it can be modify appropriately.
 
HTML:
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<div id="gpt-300x250extra_5">
  <script>
    window.googletag = window.googletag || {cmd: []};
    googletag.cmd.push(function() {
      googletag.defineSlot('/21857590943,22790428796/buzzhint.com/buzzhint.com_300x250_5', [[336, 280], [300, 250]], 'gpt-300x250extra_5').addService(googletag.pubads());
      googletag.enableServices();
      googletag.pubads().set('page_url', 'buzzhint.com');
      googletag.display("gpt-300x250extra_5");
    });
  </script>
</div>

I pasted it on my wordpress but it’s not displaying ads (the ads is from AdsVictory).
Also, one thing I just caught... ya might wanna remove the [ URL ] bbcodes
 
Last edited:
HTML:
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<div id="gpt-300x250extra_5">
  <script>
    window.googletag = window.googletag || {cmd: []};
    googletag.cmd.push(function() {
      googletag.defineSlot('/21857590943,22790428796/buzzhint.com/buzzhint.com_300x250_5', [[336, 280], [300, 250]], 'gpt-300x250extra_5').addService(googletag.pubads());
      googletag.enableServices(); 
      googletag.pubads().set('page_url', 'buzzhint.com');
      googletag.display("gpt-300x250extra_5");
    });
  </script>
</div>

I pasted it on my wordpress but it’s not displaying ads (the ads is from AdsVictory).
Not sure why it didn't take effect, but here you go
 

New Threads

Buy us a coffee!

Back
Top Bottom