diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-22 13:38:35 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-22 13:38:35 +0400 |
commit | 4ab73a7fb3ca118f479d0a32ae8f9232e1358cb5 (patch) | |
tree | 7a1e8d79ba16ef3d957aa2eae9fec3b18f3789b6 /js | |
parent | 62e5baddd62a8295066d66d2723a320e411822e3 (diff) |
refs #4996 better naming
Diffstat (limited to 'js')
-rw-r--r-- | js/piwik.js | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/js/piwik.js b/js/piwik.js index 9fba5eb706..56eadeec4a 100644 --- a/js/piwik.js +++ b/js/piwik.js @@ -2058,7 +2058,7 @@ if (typeof Piwik !== 'object') { return ''; } - function buildContent(node) + function buildContentPiece(node) { return { c_n: findContentName(node), @@ -2067,13 +2067,8 @@ if (typeof Piwik !== 'object') { }; } - /* - * Log all content - */ - function logContents() { - - // collect content - + function collectContentPieces() + { var contentNodes = queryDomMultiple(['.piwik-trackcontent', '[data-trackcontent]']); if (!contentNodes.length) { @@ -2084,9 +2079,18 @@ if (typeof Piwik !== 'object') { var index; for (index = 0; index < contentNodes.length; index++) { - contents.push(buildContent(contents[index])); + contents.push(buildContentPiece(contents[index])); } + return contents; + } + + /* + * Log all content pieces + */ + function logContentPieces() { + var contents = collectContentPieces(); + // send bulk tracking request? } @@ -3155,9 +3159,9 @@ if (typeof Piwik !== 'object') { } }, - trackContents: function () { + trackContentPieces: function () { trackCallback(function () { - logContents(); + logContentPieces(); }); }, |