Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Height is always 280px for Auto Ads #379

Open
petermarks12 opened this issue Nov 3, 2019 · 12 comments
Open

Height is always 280px for Auto Ads #379

petermarks12 opened this issue Nov 3, 2019 · 12 comments

Comments

@petermarks12
Copy link

petermarks12 commented Nov 3, 2019

I am using this library with Angular 5 and as suggested, I am using ng-adsense version 5.4.3.

Width is working fine, but why height is always 280px, no matter what. Also, I tried using className property, but it also does not set class to ins element of google, instead to the ng-adsense element which has absolutely no impact

<ng-adsense [adSlot]="XXX" [display]="'block'" [adFormat]="'auto'" [width]="728" [height]="90"
className="'make-responsive'">

@polakdominik
Copy link

Yeah, I'm having same issue.

@tomfordweb
Copy link

tomfordweb commented Nov 26, 2019

Same in Angular 8 Version 6.0.0

@favdev
Copy link

favdev commented Dec 14, 2019

Yep same here

@scttcper
Copy link
Owner

did you try display inline-block? https://support.google.com/adsense/answer/9467650?hl=en

@favdev
Copy link

favdev commented Dec 19, 2019

Thanks for replying. Can see that the ad's height is as specified now (because I've coloured the background) but now there is nothing in the ins tag after I specified display:inline-block

@scttcper
Copy link
Owner

Might depend on what height you chose and how Adsense is feeling that moment lol

@favdev
Copy link

favdev commented Dec 19, 2019

Is there a specific height it should be, or some sort of setting? It's totally fine if I remove display: inline-block

@tomfordweb
Copy link

I ended up writing my own component uses the <ins> tag provided by Google to get past this,

One thing I did learn while doing this is that the ad wrapper honors media queries. I would give this a shot if you are still having issues with this.

https://support.google.com/adsense/answer/9183363?hl=en

@mouradski
Copy link

Same issue here

btw thanks for your work :)

@Sebastien-Remy
Copy link

I ended up writing my own component uses the <ins> tag provided by Google to get past this,

One thing I did learn while doing this is that the ad wrapper honors media queries. I would give this a shot if you are still having issues with this.

https://support.google.com/adsense/answer/9183363?hl=en

@tomfordweb can you give more explanations please ?

@itsrajverma
Copy link

any update on this guys?

@Blaarkies
Copy link

Blaarkies commented Jan 26, 2022

@itsrajverma This seems to work, not sure if it has any consequences:
Add adFormat="inline" to the tag, the style don't get applied when this is set. Other values might also work, as long as it does not default to auto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants