Currently, the module makes use of the two Baidu Analytics library tracker URLs hm.baidu.com/h.js and hm.baidu.com/hm.js in multiple places in baidu_analytics.module and in other files, not to mention files to be added in the future, such as baidu_analytics.test or baidu_analytics.variable.inc.
For improved maintenance and to try to avoid duplication mistakes of these two library tracker URLs, it might perhaps be better to replace all of them with constant variables, added with PHP define to the baidu_analytics.module file.
Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this task, I would be glad to provide more information or explain in more details.
Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.
Comments
Comment #1
dydave commentedQuick follow-up on this task:
Added two new constant variables, one for each of the Baidu Analytics library tracker URLs:
Added short Doc comment blocks in code for each variable to provide a little bit of information about their usage.
I went ahead and committed the changes against the 7.x-1.x branch at cbb4cfe.
I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with this issue or related commit cbb4cfe (we would surely be happy to hear your feedback).
Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the commit or this task in general, I would be glad to provide more information or explain in more details.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!