Page 1 of 1

https and referer BIG problem.

Posted: Wed Feb 01, 2017 4:09 pm
by mservices
Script URL: https://kleinecampingsitalie.eu/ccount
Version of script: 2.1.2
Hosting company: alphamegahosting.com
URL of phpinfo.php: https://kleinecampingsitalie.eu/ccount/test/
URL of session_test.php: https://kleinecampingsitalie.eu/ccount/test/
What terms did you try when SEARCHING for a solution: searched this forum

Write your message below:

Hi Klemen,

Some time ago i changed the protocol of the above mentioned site from http to https, updated all the URL's within CCount, but from that moment on i have a problem.
I use Ccount to show my clients, who pay to be on my website, how many times possible customers have clicked on the link to their own site. The problem is that my site does not (or just a fraction) show up as the referrer in their statistics... BIG PROBLEM! because now they are claiming that my (ccount) statistics are not true because they can't find them in their statistics.... Our own campsite is on the website to so i can see in my own statistics, and the clicks that ccount counts that there is something really strange going on....
Also Google analytics doesn't see visitors to the customers website as comming from kleinecampingsitale.eu but as a direct hit....

If you want i can create a link in ccount for you to test.

I'm loosing customers because of this....

Hope you can shed some light on it...
Thank you in advance for your time...

Peter

Re: https and referer BIG problem.

Posted: Wed Feb 01, 2017 5:03 pm
by Klemen
It's hard to say what is going on.

One reason could be a lot of the traffic on your website is from bots/crawlers; these often open URLs (so they are counted as a click) but don't follow http redirect commands and/or don't pass the http referer and/or spoof the referer. Many bots also don't process Javascript (correctly) so this could also be the reason that traffic is not showing up in Google analytics that requires Javascript.

Other reasons could be legit visitors using "privacy" functions (within browsers or third party programs) blocking http referer tags and Google analytics code snippets. I would expect this to be a minor percent of users though.

The problem could also be if you are redirecting HTTPS to HTTP pages; this could give visitors warnings in some browsers so while their click is counted, they may cancel visiting the website.

What to do?

Here are some ideas that could help if bots are the main problem. Using one of them may not do much, but a combination of all could improve things. No guarantees though, of course.
  1. block access to click.php in robots.txt for bots that behave nicely; simply create a "robots.txt" file with this contents and upload it to the main folder of your domain (so it's available at example.com/robots.txt)

    Code: Select all

    User-Agent: *
    Disallow: /ccount/click.php
  2. hide CCount URLs from "stupid" bots; instead of linking directly to ccount/click.php?id=1, use Javascript to generate links and provide alternative original (no click.php) links in <noscript> tag.

    So, instead of

    Code: Select all

    <script>document.write('<'+'a hr'+'ef="ht'+'tp:/'+'/'+'example.com/ccount/click.php?id=1" rel="nofollow">Link text</'+'a'+'>');</script>
    <noscript><a href="http://example.com" rel="nofollow">Link text</a></noscript>
  3. not sure if this will make any difference, but you can also try this alternative click.php that uses HTML refresh rather than HTTP one.
That's what I can think of off the head.

Note that these problems are not CCount-specific; any tool you will use to count clicks will suffer from the same problems.

Re: https and referer BIG problem.

Posted: Wed Feb 01, 2017 5:15 pm
by mservices
Klemen,

Thank's for your reply.

Just found out what the problem was and how to solve it.
It has nothing to do with Ccount, but whit this:

protocols referrer passed?
http to http referrer passed
http to https referrer passed
https to http referrer blocked
https to https referrer passed

You can read the details here: https://www.e-nor.com/blog/google-analy ... errer-loss

My site is https and links to non https sites without sending the referer.
It is solved with a simple metatag in the header of the pages with the links.
<meta name="referrer" content="always" />

Tested it and sure enough i'm getting the referrer in in my traffic monitor and google analytics.

Thank's again for your time and support. I'm glad i can keep using ccount !!

Peter