Crawler: Stop product view count from increasing

#1
Hello,

So hopefully this will be an easy answer/solution. I have the product view count reports turned on (so when someone views a product it shows up in the product view report) and noticed that when I run the crawler it makes the product view count increase by 1 (for each time it crawls the product page, if I have desktop and mobile view to be crawled it goes up by 2).

My question: is there a way for me to leave the product view count report enabled but stop litespeed crawler from increasing the product view count? I don't want to inflate the numbers every time I run the crawler making the report inaccurate.

Thank you in advance, your time is much appreciated.
 

serpent_driver

Well-Known Member
#3
I have the product view count reports turned on
If this is the Product View Count Plugin for Wordpress, this plugin doesn't offer any setting to exclude whatever from being counted.

My question: is there a way for me to leave the product view count report enabled but stop litespeed crawler from increasing the product view count?
No, there is no way. Ask plugin developer to add a function to exclude IP or User Agent.
 
#4
@AndreyPopov @serpent_driver - Thank you for your quick replies.

you must check count script and exclude crawler IP from count.
I'm not sure how I would do this. I'm using the crawler that is given on this page: Crawler Script | Magento 2 | LiteSpeed Documentation (litespeedtech.com) and it's also coming up as my server IP address that is shown in my visitor logs. Don't believe I can block that from the product count. The user-agent is "lscache_runner". Can I run a different command? I'm using -c -r for the bash command. Would -g make a difference?



If this is the Product View Count Plugin for Wordpress, this plugin doesn't offer any setting to exclude whatever from being counted.

No, there is no way. Ask plugin developer to add a function to exclude IP or User Agent.
This is Magento. I'm referring to the built-in product view report that Magento has. It counts the page views per-product when the report is enabled. As mentioned above, I'm using the command with -c and -r. Would a different parameter work maybe -g? But I would assume the "general user-agent" would be more likely to be counted over the "lscache_runner". Though I'm not sure which is why I ask.

Thanks for your responses.
 

serpent_driver

Well-Known Member
#8
This is Magento. I'm referring to the built-in product view report that Magento has. It counts the page views per-product when the report is enabled. As mentioned above, I'm using the command with -c and -r. Would a different parameter work maybe -g? But I would assume the "general user-agent" would be more likely to be counted over the "lscache_runner". Though I'm not sure which is why I ask.

It doesn't matter if you use Wordpress or Magento. The counter function isn't cache friendly, so you can't use this function.
 
#9
crawler only send request to site.

script(code) inside Magento detect request to page and increase counter.

you need exclude:
- IP address from where crawler send request
- crawler User Agent
from Magento (theme,plugin) count algorithm
I see thank you. I will request some info from Magento then seeing how it appears there is nothing that can be done on LiteSpeed side to hide the page crawl from the view counter.

It doesn't matter if you use Wordpress or Magento. The counter function isn't cache friendly, so you can't use this function.
Ok thanks.
 

serpent_driver

Well-Known Member
#10
I see thank you. I will request some info from Magento then seeing how it appears there is nothing that can be done on LiteSpeed side to hide the page crawl from the view counter.
This job must be done by the counter function, because the crawler can't tell the counter:"Please don't count me." ;)
 

serpent_driver

Well-Known Member
#12
I was just hoping there was a way to make the crawler "hidden" from it right from the command that is used to run the crawler.
Yes, tell the counter not to count the crawler. That's it. The crawler cannot make itself invisible. It requests the URLs in the same way as a natural user.
 
Top