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

Option to stop robots inc banners views #22339

Merged
merged 17 commits into from Dec 27, 2018

Conversation

jurihahn
Copy link
Contributor

@jurihahn jurihahn commented Sep 23, 2018

Pull Request for Issue # .

Summary of Changes

Option to stop increment count of banner views if search engine is detected. Count views as before by default for BC.

Testing Instructions

Coder review
OR

  1. Create banner and open page with this banner. Check if banner view count increment.
  2. Set option "Robots Increment Impressions" to "NO"
  3. Reload page with banner. Check if banner impressions count increment. Must be +1.
  4. Change user-agent to anything includes "Googlebot".
  5. Reload page with banner. Check if banner impressions count increment. Must be same as before.
    PS: Its can be tested local too. For example in Firefox you can open Developer tools and start Responsive/Mobile view, then add new Device with any user agent.

Expected result

If set option "Robots increment impressions" to "NO", Module should not increment banner views if search engine detected

Actual result

Module increments count of banner impressions always

Documentation Changes Required

No?

@@ -26,3 +26,5 @@ MOD_BANNERS_FIELD_TARGET_LABEL="Target"
MOD_BANNERS_VALUE_STICKYORDERING="Pinned, Ordering"
MOD_BANNERS_VALUE_STICKYRANDOMISE="Pinned, Randomise"
MOD_BANNERS_XML_DESCRIPTION="The Banner Module displays the active Banners from the Component."
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_LABEL="Robots increment views"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort keys in alpha order.

@@ -19,6 +19,8 @@ MOD_BANNERS_FIELD_HEADER_DESC="Text or HTML to display before the group of banne
MOD_BANNERS_FIELD_HEADER_LABEL="Header Text"
MOD_BANNERS_FIELD_RANDOMISE_DESC="Randomise the ordering of the banners."
MOD_BANNERS_FIELD_RANDOMISE_LABEL="Randomise"
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_LABEL="Robots increment views"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize words Robots Increment Views

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be Impressions?

MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_LABEL="Robots increment views"
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_DESC="Search engines increase the number of banner views"
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_LABEL="Robots Increment Impressions"
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_DESC="Search engines increase the number of banner Impressions"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lower case impressions

@@ -19,6 +19,8 @@ MOD_BANNERS_FIELD_HEADER_DESC="Text or HTML to display before the group of banne
MOD_BANNERS_FIELD_HEADER_LABEL="Header Text"
MOD_BANNERS_FIELD_RANDOMISE_DESC="Randomise the ordering of the banners."
MOD_BANNERS_FIELD_RANDOMISE_LABEL="Randomise"
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_LABEL="Robots Increment Impressions"
MOD_BANNERS_FIELD_ROBOTS_VIEWS_DOIMPRESS_DESC="Search engines increase the number of banner impressions"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add period at the end of the sentence.

@jurihahn jurihahn changed the title Stop robots inc banners views Option to stop robots inc banners views Sep 23, 2018
@brianteeman
Copy link
Contributor

brianteeman commented Sep 23, 2018

Can someone stop to think if this wording accurately describes what it is intended to do. For example there is no mention that this is "excluding search engine generated 'clicks' from the hit count". It just says it excludes robots which is not technically accurate.

Finally I am still not convinced that this is a useful addition to the core of joomla and is better placed as an extension. If this is accepted then we should have the same option everywhere that we record a "hit"

@jurihahn
Copy link
Contributor Author

Sorry, i think this is not the same. For the banners it's more important. If i see statistics of one of my sites:
real user make about 3 000 page views/impressions per day
search engines make about 13 000 !!! And all can be excluded...
If i want sell views/impressions, i can't..

Why can't we make it more accurate? This is only an option...

Make better wording is always welcome.

and maybe i do not understand all what you say, but here is nothing to exclude "click", only views/impressions

@jurihahn
Copy link
Contributor Author

Finally I am still not convinced that this is a useful addition to the core of joomla and is better placed as an extension. If this is accepted then we should have the same option everywhere that we record a "hit"

Really? Why joomla have this in the core? Why we should create new extension for only one option? Joomla banners component is not perfect, but we can make it better.
It is Joomla politic? Make Joomla extensions not good and say "install third party extension they work better".

@infograf768
Copy link
Member

The wording is indeed confusing. The feature, in its simplicity, looks OK to me. I see no reason to refuse it.

@jurihahn
Copy link
Contributor Author

The wording is indeed confusing.

I will be glad to change the text to more suitable. Someone will advise more suitable texts?
Maybe like this.
Label: Search engines increase banner impressions count
Description: If set to NO, detected search engines would not increase impressions count of banner.

@infograf768
Copy link
Member

I must say I did not test the code and results, though. Therefore it needs testing as I work local.

@SharkyKZ
Copy link
Contributor

SharkyKZ commented Sep 24, 2018

Regarding usability, I can't think of a scenario where user would want this in one module but not in another. Perhaps this should be set globally in com_banners instead of individually in each banner module?

@jurihahn
Copy link
Contributor Author

I must say I did not test the code and results, though. Therefore it needs testing as I work local.

Its can be tested local too. For example in Firefox you can open Developer tools and start Responsive/Mobile view, then add new Device with any user agent.

Regarding usability, I can't think of a scenario where user would want this in one module but not in another. Perhaps this should be set globally in com_banners instead of individually in each banner module?

yes, I agree.

@@ -32,6 +32,18 @@
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove tabs

@@ -32,6 +33,7 @@ public static function &getList(&$params)
$document = JFactory::getDocument();
$app = JFactory::getApplication();
$keywords = explode(',', $document->getMetaData('keywords'));
$config = ComponentHelper::getParams('com_banners');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align =

@jurihahn
Copy link
Contributor Author

I have tested this PR with #22368 it show very fine result. ~700 impressions per hour before and ~250 impressions per hour after patch.

Maybe i commit one more "option" to ignore click made by robots by the same way? Or should it be different PR?

@infograf768
Copy link
Member

Maybe for the strings:
COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_LABEL="Impressions by Search Engines"
COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_DESC="If set to NO, prevents search engines clicks from increasing the number of impressions."

@Quy
Copy link
Contributor

Quy commented Sep 26, 2018

Be sure to sort the keys in alpha order.

@jurihahn
Copy link
Contributor Author

Be sure to sort the keys in alpha order.

I don't understand where is it wrong?

@jurihahn
Copy link
Contributor Author

COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_LABEL="Impressions by Search Engines"

This is good!

COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_DESC="If set to NO, prevents search engines clicks from increasing the number of impressions."

in this PR is only impressions ignoring, not clicks

@@ -137,6 +137,8 @@ COM_BANNERS_FIELD_TRACKCLICK_DESC="Record the number of clicks on the banners on
COM_BANNERS_FIELD_TRACKCLICK_LABEL="Track Clicks"
COM_BANNERS_FIELD_TRACKIMPRESSION_DESC="Record the impressions (views) of the banners on a daily basis."
COM_BANNERS_FIELD_TRACKIMPRESSION_LABEL="Track Impressions"
COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_LABEL="Impressions by Search Engines"
COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_DESC="If set to NO, prevents search engines from increasing the number of impressions."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move line 141 above line 140.

Copy link
Contributor Author

@jurihahn jurihahn Sep 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now I understand)
I just watched the new lines were in the right place )))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==>
"Include search engines in the count of impressions"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==>
"Include search engines in the count of impressions"

thanks, it's done!

@jurihahn
Copy link
Contributor Author

@brianteeman what do you think now?

@@ -137,7 +137,7 @@ COM_BANNERS_FIELD_TRACKCLICK_DESC="Record the number of clicks on the banners on
COM_BANNERS_FIELD_TRACKCLICK_LABEL="Track Clicks"
COM_BANNERS_FIELD_TRACKIMPRESSION_DESC="Record the impressions (views) of the banners on a daily basis."
COM_BANNERS_FIELD_TRACKIMPRESSION_LABEL="Track Impressions"
COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_DESC="If set to NO, prevents search engines from increasing the number of impressions."
COM_BANNERS_FIELD_TRACKROBOTSIMPRESSION_DESC="Include search engines in the count of impressions"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a period.

Copy link
Contributor

@brianteeman brianteeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strings are ok

@Quy
Copy link
Contributor

Quy commented Sep 30, 2018

I have tested this item ✅ successfully on 2f36648


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22339.

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 2f36648


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22339.

@Quy
Copy link
Contributor

Quy commented Dec 25, 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22339.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Dec 25, 2018
@mbabker mbabker added this to the Joomla 3.9.2 milestone Dec 27, 2018
@mbabker mbabker merged commit 63d39cf into joomla:staging Dec 27, 2018
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Dec 27, 2018
@jurihahn jurihahn deleted the stop-robots-inc-banners-views branch March 17, 2019 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants