Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module provides e-commerce statistics tracking through Yandex Metrics service for Drupal Commerce.
project page - http://drupal.org/sandbox/holdmann/1557584
Link to repo - git clone http://git.drupal.org/sandbox/holdmann/1557584.git commerce_yandex_metrics
Comments
Comment #1
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxholdmann1557584git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and 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.
Comment #2
holdmann CreditAttribution: holdmann commentedFixed.
Comment #3
pranit84FILE: /var/www/drupal-7-pareview/pareview_temp/commerce_yandex_metrics.module
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
45 | ERROR | Using the e flag in preg_match is a possible security risk. For
| | details see http://drupal.org/node/750148
--------------------------------------------------------------------------------
Comment #4
holdmann CreditAttribution: holdmann commentedThere is no "e" flag in regular expression.
I guess, it's some code sniffer lex analizer bug.
Take a look at source code of this string:
Comment #5
holdmann CreditAttribution: holdmann commentedComment #6
holdmann CreditAttribution: holdmann commentedComment #7
kalabroVery glad to see the module on the basis of Yandex.Metrics. Module provides useful stuff for ecommerce sites.
Here is my manual review.
I can't see why module weight is changed. You are not implementing any hooks which yandex_metrics implement, so .install file can be omitted. Maybe I miss something or maybe it is not needed?
I see you are calculating variables
$shipping
,$tax_sum
and etc, but it seems they are not used anywhere.Try to use
yandex_metrics_get_counter_for_current_site()
instead ofpreg_match()
.Problem in this code:
'currency' => variable_get('commerce_default_currency', 'RUR'),
I completed order in USD, but got RUR in
yaParams
. You can always find proper currency code in order/commerce_order_total object.Provide info about module dependencies (with links) on module page and in README.txt
Now you are using 3 different name/email pairs in your commits.
Try to use one configuration for all commits on Drupal.org. If you are commiting from over computer, you can configure git identities per project. See http://drupal.org/node/1022156, http://drupal.org/node/1053134
Make commit messages more informative. See http://drupal.org/node/52287
Try to use "one commit per one problem" concept. It will keep git history clean and useful.
Now your JS is added on complete page regardless of page specific and role specific Yandex.Metrics tracking settings. I opened an issue to fix it on Yandex.Metrics side: #1978382: Provide API for managing Yandex.Metrika goals You are welcome to discussion.
Comment #8
Konstantin Komelin CreditAttribution: Konstantin Komelin commented@kalabro, thanks for the good review!
3. I'm not sure it's good idea to use yandex_metrics_get_counter_for_current_site() in that context because it's heavy method which makes HTTP request to Yandex.Metrika, transforms internationalized domain name, looks for mirrors.
User will have to wait ThankYouForYourOrder page loading because of yandex_metrics_get_counter_for_current_site().
The preg_match approach is much faster.
What do you think, guys?
Comment #9
kalabroThanks, Konstantin!
3. Agreed. Let's leave preg_match.
About #4: it's known issue #1779020: Invalid match for "Using the e flag in preg_match"
Comment #10
holdmann CreditAttribution: holdmann commentedHi, guys!
Thanks for review.
1. .install file was removed at all;
2. Unused variables was cleaned;
3. In Yandex.Metrics module version 1.x there is no another way to get counter code (as designed);
4. Now, currency code for all order fetched from current order object;
5. Information 'bout dependencies added to README.txt and project page;
6. I'm new bee in git, tryed to make last commit according to yours recommendations.
Also, added RBAC-check through yandex_metrics_show_counter_for_role() before adding js-code to DC checkout complete page.
Comment #11
kscheirerLooks pretty good! You may want to consider making the goal "ORDER_COMPLETE" a user-configurable setting in the future.
No major issues found.
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #12
kalabroI confirm RTBC.
This commit message can be "by holdmann | kalabro: Added ACBR-check before inject goal-code to checkout complete page." or just "by holdmann: Added ACBR-check before inject goal-code to checkout complete page." because there is no my code.
Good luck with your project!
Comment #13
holdmann CreditAttribution: holdmann commentedHi!
Thanks a lot for your reviews.
Waiting so much for full project approval =)
Comment #14
kscheirerThanks for your contribution, holdmann!
I updated your account to let you 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 get involved!
Thanks, 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 to the dedicated reviewer(s) as well.
----
Top Shelf Modules - Crafted, Curated, Contributed.