Integration with the Variable module enables modules, like the Contextual Variables and Configuration builder modules, to expand the functionality of this module, allowing for things like variable switching based on environment or customized configuration pages and more.

Additionally Variables could be integrated with Features module as well for export.

For the Baidu Analytics module, variables could allow different trackers to be configured for different domains or languages, which could certainly be a great advanced feature, as explained in module's documentation: How to change the Web Property ID per hostname / domain / language.
For example, it could allow configuring a different tracking Web Property ID for each language on the site.

Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this feature request, 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

DYdave’s picture

Status: Active » Fixed

Quick follow-up on this feature request:

Added a new file called baidu_analytics.variable.inc which contains the implementation of two major hooks from the Variable API:

  • baidu_analytics_variable_info: exhaustive declaration of almost all the variables introduced by the module.
    Several validation callbacks had to be added, for the Code snippets (before and after) and for the Web Property ID.
     
  • baidu_analytics_variable_group_info to add a new group for the module (Displayed as a vertical tab on the Variables admin page).

I went ahead and committed the changes against the 7.x-1.x branch at 7c9bf46, followed by another commit at b2fee18
to greatly improve the file baidu_analytics.variable.inc added in previous commit: Added support for almost all module's variables.

Since almost all Baidu Analytics variables have been integrated, we might certainly come back to this ticket or create new issues in the future if variables had to be removed/added/changed.

Therefore, 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 any of the related commits (7c9bf46, b2fee18 - 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 commits or this feature request 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!

Status: Fixed » Closed (fixed)

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