Scroll Depth is a small Google Analytics plugin which enable to measure how far users are scrolling a web page. It monitors the 25%, 50%, 75%, and 100% scroll points, sending a Google Analytics Event for each one. This also track when specific elements on the page are scrolled into view.

Project Page: https://www.drupal.org/sandbox/shiju_ckl/2769849

Git clone: git clone --branch 7.x-1.x https://git.drupal.org/sandbox/shiju_ckl/2769849.git scroll_depth_analytics

Comments

shiju_ckl created an issue. See original summary.

SHIJU JOHN’s picture

Issue summary: View changes
PA robot’s picture

Issue summary: View changes
Status: Active » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxshiju_ckl2769849git

Fixed the git clone URL in the issue summary for non-maintainer users.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

dsouza_rohan’s picture

Automated Review

http://pareview.sh/pareview/httpsgitdrupalorgsandboxshijuckl2769849git

Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

Manual Review

Individual user account
[Yes: Follows ] the guidelines for individual user accounts.
No duplication
[Yes: Does not cause] module duplication and/or fragmentation
,although there are few similar modules in sandbox that are not yet in the Project application queue.
Master Branch
[No: Does not follow] the guidelines for master branch.
Licensing
[Yes: Follows] the licensing requirements.
3rd party assets/code
[Yes: Follows] the guidelines for 3rd party assets/code.
README.txt/README.md
[Yes: Follows ] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Follows] the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements.
Coding style & Drupal API usage
you should check issues mention in the automated test.. first.

This review uses the Project Application Review Template.

SHIJU JOHN’s picture

Status: Needs work » Needs review

Thanks dsouza_rohan. I have fixed the issues.

ARUN AK’s picture

Status: Needs review » Needs work

Hi,

I have installed this module and enabled scroll tracking in google analytics configuration page. But still ga events are not triggering while scrolling. There is no warning/error messages showing in pages and also no warning in status report. Finally I found, need to install Scroll Depth library in README.txt file.

I think you can make use of hook_requirements() to check availability of library.

Thanks,
ARUN AK

SHIJU JOHN’s picture

Status: Needs work » Needs review

Thanks ARUN AK for your review comments. I have added hook_requirements() and committed the updated module.

mepushpendra’s picture

Status: Needs review » Needs work

Hi shiju_ckl,

I had a quick look at your module and done my bit of review :)
The automatic review is giving a minor problem, due to the missing default branch.

Automated Review:
Git errors:
Git default branch is not set, see the documenttation on setting a default branch.

Manual Review:
1. Use project page template for the project page.
2. Add hook_help in module.
3. Use Readme.txt template for the module
4. Use proper commit messages see the documenttation

SHIJU JOHN’s picture

Status: Needs work » Needs review

Thanks @mepushpendra for your review comments. I have fixed all the points mentioned.

manimjs_drupal’s picture

Hi @shiju_ckl

Thank You for your contribution to the Drupal Community with an Excellent Idea. Sure your module is helpful for many websites to track the 'depth of the pages' with Google Analytics.

I went through your module, the code written nicely with proper Drupal Hooks. I Appreciate your effort on this to create this module.

I installed your module in localhost and I'm trying to view the results/output. Can you provide some information that what are the best ways to test your module's output in my local-machine. First I would like to execute your module from my local-host.

Thanks.

SHIJU JOHN’s picture

Thanks @manimjs_drupal for reviewing the Scroll Depth Analytics module. After installing the module you can view the events are fired while scrolling the page by using Google Analytics Debugger Plugin(https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkm...). If you have configured a valid GA property code in Google Analytics Settings Page, the scroll percentage can be viewed in Google Analytics UI Report(http://analytics.google.com).

ARUN AK’s picture

Status: Needs review » Needs work

Hi Shiju,

I have done one more round of review and please see my comments below:

  1. scroll_depth_analytics_init(): why do you add your JS globally in hook_init()? That will be executed on every single page request even if no scroll tracking enabled for that page?
  2. scroll_depth_analytics_page_scroll_visibility_pages(): This function is using to check whether scroll tracking is enabled for particular page. But also it adding module js files in to pages without checking any condition. You can use hook_page_build() to add relevant js to the pages.
  3. It seems like you are adding scroll_depth_analytics.js two times in to the pages.
    drupal_add_js(drupal_get_path('module', 'scroll_depth_analytics') . '/js/scroll_depth_analytics.js'); found in two places in scroll_depth_analytics.module line no 67 and 195.

Thanks,
ARUN AK

manimjs_drupal’s picture

Hi shiju_ckl,

Thanks for the clarification - Your module is working perfectly. Yeah now I can able to see the output/results from my local machine. It is tracking the pages of depth based on the page scrolling. Its been a great module.

Thanks for your comments.

Regards,
Mani

SHIJU JOHN’s picture

Status: Needs work » Needs review

Hi ARUN AK,

Thanks for your review comments. I have fixed the code issues mentioned. Please verify and move to RTBC

ARUN AK’s picture

Status: Needs review » Reviewed & tested by the community

scroll_depth_analytics_page_build(): in the beginning of this hook you are adding scrolssssl_depth_analytics.inc file, but file is not found in the repo. If not using please remove this line.

Include minified version of jquery-scrolldepth library js file (jquery.scrolldepth.min.js). It is already available in jquery-scrolldepth library.

Do proper commenting for scroll_depth_analytics_element_scroll_elements() function. Explain more in terms what that function exactly doing.

Found:

/**
 * Implements function scroll_depth_analytics_element_scroll_elements().
 */

In your module scroll_depth_analytics.js file, value for some of the options seems like hard-coded (eg: minHeight, userTiming, pixelDepth, nonInteraction). As per Scroll Depth library, these values are configurable. You can consider these options in your further development of this module.

I installed and configured scroll_depth_analytics module in my local and its working properly and triggering GA events for both scroll percentage and element tracking.

Please fix above mentioned comments before have a final release for the module. Otherwise looks good to me. Moving in to RTBC.

Thanks,
ARUN AK

SHIJU JOHN’s picture

Thanks ARUN AK for moving to RTBC. I have fixed the above mentioned comments. Please review and approve.

apaderno’s picture

Assigned: Unassigned » apaderno
Status: Reviewed & tested by the community » Fixed

I will update your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks go the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.