Jump to content

Community

newbie LAC

(NB41) Enhanced Advertisements

Recommended Posts

2 hours ago, christopher-w said:

Can you show me the syntax please?

https://invisioncommunity.com/4guides/suite-applications/pages/core-concepts/blocks-r151/

Quote

On pages built using custom HTML (or if you want to insert the block in an IPS4 template), a special tag is used to insert the block:


{block="block_id"}

Share this post


Link to post
Share on other sites

Hi newbie -

Is there anyway to block the ads from showing to bots?  The issue that I am running into is that the Indexing crawler is set to Googlebot Smartphone.  However for some reason the ads don't render the mobile version of the ads so Google is penalizing the site for not being mobile friendly when really it is. 

I see two solutions here if possible.

1.)  Allow us to disable ads when bots are crawling the site

2.)  Update to code to check for bots and render the mobile ads for them.

Thanks for any ideas/support you can offer here.

Chad

Share this post


Link to post
Share on other sites

Hello,

9 hours ago, BlueEye said:

ideas/support you can offer here.

You can check the bots using 

\IPS\Session::i()->userAgent->spider

Example

{{if \IPS\Session::i()->userAgent->spider}}
	Show code for bots
{{else}}
	Show code for others
{{endif}}

 

Share this post


Link to post
Share on other sites

Thank you very much newbie LAC!  Per your example, I know there is also an "Extra condition" area where you could return some value (string, number) to display an advert.  Could your code in the if statement be altered slightly to ready NOT A SPIDER?  In this case I would simply add that one line to the extra condition area vs. wrapping each advert in an if/else statement.

{{if \IPS\Session::i()->userAgent->spider}}

Share this post


Link to post
Share on other sites
15 hours ago, BlueEye said:

Per your example, I know there is also an "Extra condition" area where you could return some value (string, number) to display an advert.  Could your code in the if statement be altered slightly to ready NOT A SPIDER?

{{if !\IPS\Session::i()->userAgent->spider}}1{{endif}}

 

Share this post


Link to post
Share on other sites

One last question Newbie - if I enable Lazy Loading of media content on the site, will this lazy load the ads?  If not, is there a way to enable an option to lazy load ads?

Thank you!

Chad 

Share this post


Link to post
Share on other sites

Hello,

13 hours ago, BlueEye said:

One last question Newbie - if I enable Lazy Loading of media content on the site, will this lazy load the ads?  If not, is there a way to enable an option to lazy load ads?

Do you mean images?

images.jpg.46dfb0d1a1499079be99e0739b589ced.jpg

If so they don't support lazy load

Share this post


Link to post
Share on other sites
7 minutes ago, BlueEye said:

I typically use HTML code.

22 hours ago, BlueEye said:

if I enable Lazy Loading

Anyway you should to add additional code

This code works in adverts

<img {{if settings.lazy_load_enabled}}src="{expression="\IPS\Text\Parser::blankImage()"}" data-{{endif}}src='https://dne4i5cb88590.cloudfront.net/invisionpower-com/profile/photo-thumb-293560.gif' alt='newbie-lac'>

Share this post


Link to post
Share on other sites

Dear Newbie LAC

I am now using your plugin again.

It still works fine there is just one small problem. When I try to restrict an ad for just desktop and then in the settings I will tick that option, after saving that option will not be saved. When I go back into the settings then, it always shows "All devices". So I am not able to only show a certain ad only on desktop devices which is a big problem because some of my affiliate ads are not responsive and so they will be therefore cut badly on phone devices.

How can I solve this? Would be amazing if you could help me with that!

Best,

Marcel

Share this post


Link to post
Share on other sites

Hello,

3 minutes ago, Marcel Iseli said:

When I try to restrict an ad for just desktop and then in the settings I will tick that option, after saving that option will not be saved. When I go back into the settings then, it always shows "All devices".

I can not reproduce on the latest version.

 

Share this post


Link to post
Share on other sites
1 minute ago, newbie LAC said:

Hello,

I can not reproduce on the latest version.

 

Maybe I haven't the last version then. Let me check this. Thanks a lot for the quick reply. I think I have 1.0.8.

oh I did not yet pay the renewal fee. I just did that. and will now try with the latest version!

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy