Jump to content
We want to feature your community! ×

Community

Ezoic & Invision Compatibility


Unlucky
 Share

Recommended Posts

We are testing Ezoic on one of our websites and already have seen an improvement in revenue generated in the first few days.

However we are spotting some compatibility issues which are going to be a show stopper unless we can get them resolved.

Is anyone successfully using Ezoic with the latest version of IPS community and how did you get things like your front end block manager, sign in as user and live meta tag editor working, or are you using Ezoic successfully without any of issues with those?

Thanks in advance.

Link to comment
Share on other sites

  • 4 months later...

@asigno

Are you having any problems with member IP addresses?

We are getting the Ezoic servers IP's instead of the member IPs registered in the CMS

We have logged a call about this with invision but the only support we have is a suggestion to switch on the setting -Trust IP addresses provided by proxies?

This has made no difference unfortunately and invision say any more support is outside the scope of their support.

I just wondered if any Ezoic users have found a solution?

Ezoic have offered the following support to help but we have no idea which file we would need to add this code in.

By implementing the XFF header, Ezoic will send the IP address of the original web visitor through to your server in the X-Forwarded-For header.

How to Add the XFF?

  • In PHP it is available in: $_SERVER['HTTP_X_FORWARDED_FOR']
  • You need to put the code above in a file that all of your pages access (e.g. header.php, init.php or config.php)
  • You should see $_SERVER['REMOTE_ADDR'], which you can replace with$_SERVER['HTTP_X_FORWARDED_FOR']

 

  • In .NET it's available in:  HttpContext.Current.Request.Headers["X-Forwarded-For"]

 

Thanks in advance if anyone can offer any help or suggestion

 

 

 

Link to comment
Share on other sites

42 minutes ago, Unlucky said:

@asigno

Are you having any problems with member IP addresses?

We are getting the Ezoic servers IP's instead of the member IPs registered in the CMS

We have logged a call about this with invision but the only support we have is a suggestion to switch on the setting -Trust IP addresses provided by proxies?

This has made no difference unfortunately and invision say any more support is outside the scope of their support.

I just wondered if any Ezoic users have found a solution?

Ezoic have offered the following support to help but we have no idea which file we would need to add this code in.

By implementing the XFF header, Ezoic will send the IP address of the original web visitor through to your server in the X-Forwarded-For header.

How to Add the XFF?

  • In PHP it is available in: $_SERVER['HTTP_X_FORWARDED_FOR']
  • You need to put the code above in a file that all of your pages access (e.g. header.php, init.php or config.php)
  • You should see $_SERVER['REMOTE_ADDR'], which you can replace with$_SERVER['HTTP_X_FORWARDED_FOR']

 

  • In .NET it's available in:  HttpContext.Current.Request.Headers["X-Forwarded-For"]

 

Thanks in advance if anyone can offer any help or suggestion

 

 

 

It's definitely outside the scope of IPS support if you are self-hosted -- this is something your sysadmin can advise on.
I'm assuming Ezoic's solution is acting as a reverse proxy -- like CloudFlare, and so the situation is not too dissimilar.

 

Changing 'Trust IP addresses provided by proxies' isn't hugely advisable because then anyone can spoof IP addresses (if your webserver is contacted directly).

You will need to configure your webserver (nginx or apache) to accept the X-Forwarded-For header from a trusted proxy list that Ezoic specify. 

 

That may not fix your other issues that you described in the first post though (certain things not working). It may be that Ezoic is caching too aggressively and isn't meant for a dynamic community like Invision. This is something you'll have to explore with your sysadmin or Ezoic's support.

 

Edited by G17 Media
Link to comment
Share on other sites

Hi @Unlucky I'm not having any issues, I'm using the "Trust IP addresses provided by proxies?" and have Ezoic deployed through Cloudflare.

If you use the XFF header it needs to be on every page of the site so you'll need to add it to the head of a template file which is used across all pages.

Link to comment
Share on other sites

10 hours ago, asigno said:

Hi @Unlucky I'm not having any issues, I'm using the "Trust IP addresses provided by proxies?" and have Ezoic deployed through Cloudflare.

If you use the XFF header it needs to be on every page of the site so you'll need to add it to the head of a template file which is used across all pages.

Hi,

So putting it in the head section of the  global template file would be ok?

Also we use cloudflare to. Is there anything that needs to be configured in cloudflare to make the Trust IP addresses provided by proxies?"  work?

Thanks,

Edited by Unlucky
Link to comment
Share on other sites

Not that I remember, I've double checked my template files and I don't have the XFF header and don't have issues.

Maybe it's worth turning off any caching and seeing if that resolves it, could be an issue with how the cache has been set up.

Link to comment
Share on other sites

  • 3 weeks later...

I set a cookie to certain user groups, Ezoic then don't display ads to those browsers with cookies.

I use GTM to set the cookie on login.

1. I have a custom JS variable, which returns the member group:

function() {
 return window.groupId 
}

2. I have a lookup table which then changes the output as it's just the DB number of the group and I'd like it readable

3. Then I have a custom HTML tag to create a cookie with noAdverts = true

<script>
    var memberType = {{Lookup table - Group ID}};
    if (memberType === 'Admin' || memberType === 'Moderator' || memberType === 'YOC Member' || memberType === 'Supporter' || memberType === 'Corporate') {
  var expirationTime = 7776000; // THREE month in seconds
        expirationTime = expirationTime * 1000; // Converts expirationtime to milliseconds
        var date = new Date();
        var dateTimeNow = date.getTime();
        date.setTime(dateTimeNow + expirationTime); // Sets expiration time (Time now + one month)
        var expirationTime = date.toUTCString(); // Converts milliseconds to UTC time string
        document.cookie = "noAdverts = true; expires=" + expirationTime + "; path=/; domain=." + location.hostname.replace(/^www\./i, ""); // Sets cookie for all subdomains
    }  
</script>

4. Ezoic's tech team make a change their end to only allow ads to be served to non cookied browsers

 

It's not perfect, as I didn't bother to set a script to remove the cookie on logout. But I also didn't want those users to see ads if they did log out, so set a 3 month expiry.

It's possible for anyone to manually create the same cookie value and they wouldn't see ads, but I think it's very unlikely for someone to do this.

Edited by asigno
Link to comment
Share on other sites

On 8/22/2019 at 3:25 AM, asigno said:

I set a cookie to certain user groups, Ezoic then don't display ads to those browsers with cookies.

I use GTM to set the cookie on login.

1. I have a custom JS variable, which returns the member group:


function() {
 return window.groupId 
}

2. I have a lookup table which then changes the output as it's just the DB number of the group and I'd like it readable

3. Then I have a custom HTML tag to create a cookie with noAdverts = true


<script>
    var memberType = {{Lookup table - Group ID}};
    if (memberType === 'Admin' || memberType === 'Moderator' || memberType === 'YOC Member' || memberType === 'Supporter' || memberType === 'Corporate') {
  var expirationTime = 7776000; // THREE month in seconds
        expirationTime = expirationTime * 1000; // Converts expirationtime to milliseconds
        var date = new Date();
        var dateTimeNow = date.getTime();
        date.setTime(dateTimeNow + expirationTime); // Sets expiration time (Time now + one month)
        var expirationTime = date.toUTCString(); // Converts milliseconds to UTC time string
        document.cookie = "noAdverts = true; expires=" + expirationTime + "; path=/; domain=." + location.hostname.replace(/^www\./i, ""); // Sets cookie for all subdomains
    }  
</script>

4. Ezoic's tech team make a change their end to only allow ads to be served to non cookied browsers

 

It's not perfect, as I didn't bother to set a script to remove the cookie on logout. But I also didn't want those users to see ads if they did log out, so set a 3 month expiry.

It's possible for anyone to manually create the same cookie value and they wouldn't see ads, but I think it's very unlikely for someone to do this.

@asigno -  Is this something you can offer to other members for payment?

If so, how much?

Many thanks,

Edited by Unlucky
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 4 weeks later...
On 9/28/2019 at 11:19 PM, asigno said:

Hi

both 1&2 are variables, 1 custom js variable, 2 custom - user defined - lookup table.

3. is a custom html tag

When you say "2 custom - user defined - lookup table" do you mean you added a new table to your DB to do group lookups for ezoic?

Link to comment
Share on other sites

  • 4 weeks later...
On 10/25/2019 at 4:13 AM, Morgin said:

When you say "2 custom - user defined - lookup table" do you mean you added a new table to your DB to do group lookups for ezoic?

No, I have added JS to the template to send the group ID to a JS variable. I then use a lookup table in GTM to read that variable and choose whether to set the cookie to not show ads.

<script>
var groupId = {expression="\IPS\Member::loggedIn()->member_group_id"};
</script>

 

Link to comment
Share on other sites

 Share

×
×
  • 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