diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-12-01 02:57:37 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-12-01 02:57:37 +0300 |
commit | 107147670f46b234afadefe82e0c384b10c41279 (patch) | |
tree | 37aaebf3b7444cb03c36964696daae2604ce2ac5 /plugins/Contents | |
parent | 592f9bd80e27e48f8159a90d6df055f8f0791f93 (diff) |
New visit dimension "total interactions" and new action dimension "Interaction position" and corresponding segments (#10911)
* adding new interaction segments
* add possibility to limit queries
* fix Piwik does not join correctly if 2 custom joins require each other
* added position to api output
* Contents plugin: Rename "Interaction" metric to "Content Interaction"
Diffstat (limited to 'plugins/Contents')
10 files changed, 29 insertions, 9 deletions
diff --git a/plugins/Contents/Columns/ContentInteraction.php b/plugins/Contents/Columns/ContentInteraction.php index 1c3632d3cc..149ed94059 100644 --- a/plugins/Contents/Columns/ContentInteraction.php +++ b/plugins/Contents/Columns/ContentInteraction.php @@ -23,14 +23,14 @@ class ContentInteraction extends ActionDimension { $segment = new Segment(); $segment->setSegment('contentInteraction'); - $segment->setName('Contents_Interaction'); + $segment->setName('Contents_ContentInteraction'); $segment->setAcceptedValues('The type of interaction with the content. For instance "click" or "submit".'); $this->addSegment($segment); } public function getName() { - return Piwik::translate('Contents_Interaction'); + return Piwik::translate('Contents_ContentInteraction'); } public function getActionId() diff --git a/plugins/Contents/Contents.php b/plugins/Contents/Contents.php index a217e159c7..99e47bf8fd 100644 --- a/plugins/Contents/Contents.php +++ b/plugins/Contents/Contents.php @@ -27,7 +27,7 @@ class Contents extends \Piwik\Plugin public function addMetricTranslations(&$translations) { $translations['nb_impressions'] = 'Contents_Impressions'; - $translations['nb_interactions'] = 'Contents_Interactions'; + $translations['nb_interactions'] = 'Contents_ContentInteractions'; $translations['interaction_rate'] = 'Contents_InteractionRate'; } diff --git a/plugins/Contents/lang/en.json b/plugins/Contents/lang/en.json index 78e347eaaa..915b9d9746 100644 --- a/plugins/Contents/lang/en.json +++ b/plugins/Contents/lang/en.json @@ -2,8 +2,8 @@ "Contents": { "PluginDescription": "Content and banner tracking lets you measure the performance (views, clicks, CTR) of any piece of content on your pages (Banner ad, image, any item).", "Impressions": "Impressions", - "Interactions": "Interactions", - "Interaction": "Interaction", + "ContentInteraction": "Content Interaction", + "ContentInteractions": "Content Interactions", "InteractionRate": "Interaction Rate", "ContentName": "Content Name", "ContentPiece": "Content Piece", diff --git a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml index 35ee103b17..a7442f27b2 100644 --- a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml @@ -11,7 +11,7 @@ <dimension>Content Name</dimension> <metrics> <nb_impressions>Impressions</nb_impressions> - <nb_interactions>Interactions</nb_interactions> + <nb_interactions>Content Interactions</nb_interactions> </metrics> <metricsDocumentation> <nb_impressions>The number of times a content block, such as a banner or an ad, was displayed on a page.</nb_impressions> @@ -29,7 +29,7 @@ <columns> <label>Content Name</label> <nb_impressions>Impressions</nb_impressions> - <nb_interactions>Interactions</nb_interactions> + <nb_interactions>Content Interactions</nb_interactions> <interaction_rate>Interaction Rate</interaction_rate> </columns> <reportData> diff --git a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml index d7e5a543f8..0ed4eb891e 100644 --- a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml @@ -11,7 +11,7 @@ <dimension>Content Piece</dimension> <metrics> <nb_impressions>Impressions</nb_impressions> - <nb_interactions>Interactions</nb_interactions> + <nb_interactions>Content Interactions</nb_interactions> </metrics> <metricsDocumentation> <nb_impressions>The number of times a content block, such as a banner or an ad, was displayed on a page.</nb_impressions> @@ -29,7 +29,7 @@ <columns> <label>Content Piece</label> <nb_impressions>Impressions</nb_impressions> - <nb_interactions>Interactions</nb_interactions> + <nb_interactions>Content Interactions</nb_interactions> <interaction_rate>Interaction Rate</interaction_rate> </columns> <reportData> diff --git a/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_day.xml b/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_day.xml index 38f9ab1424..292d9feadf 100644 --- a/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_day.xml @@ -14,6 +14,7 @@ <pageId>1</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -42,6 +43,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> @@ -117,6 +119,7 @@ <pageId>13</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -145,6 +148,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> diff --git a/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_month.xml b/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_month.xml index 38f9ab1424..292d9feadf 100644 --- a/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_month.xml +++ b/plugins/Contents/tests/System/expected/test_Contents__Live.getLastVisitsDetails_month.xml @@ -14,6 +14,7 @@ <pageId>1</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -42,6 +43,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> @@ -117,6 +119,7 @@ <pageId>13</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -145,6 +148,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> diff --git a/plugins/Contents/tests/System/expected/test_Contents_contentInteractionMatch__Live.getLastVisitsDetails_day.xml b/plugins/Contents/tests/System/expected/test_Contents_contentInteractionMatch__Live.getLastVisitsDetails_day.xml index 38f9ab1424..292d9feadf 100644 --- a/plugins/Contents/tests/System/expected/test_Contents_contentInteractionMatch__Live.getLastVisitsDetails_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents_contentInteractionMatch__Live.getLastVisitsDetails_day.xml @@ -14,6 +14,7 @@ <pageId>1</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -42,6 +43,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> @@ -117,6 +119,7 @@ <pageId>13</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -145,6 +148,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> diff --git a/plugins/Contents/tests/System/expected/test_Contents_contentTargetMatch__Live.getLastVisitsDetails_day.xml b/plugins/Contents/tests/System/expected/test_Contents_contentTargetMatch__Live.getLastVisitsDetails_day.xml index 38f9ab1424..292d9feadf 100644 --- a/plugins/Contents/tests/System/expected/test_Contents_contentTargetMatch__Live.getLastVisitsDetails_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents_contentTargetMatch__Live.getLastVisitsDetails_day.xml @@ -14,6 +14,7 @@ <pageId>1</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -42,6 +43,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> @@ -117,6 +119,7 @@ <pageId>13</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -145,6 +148,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> diff --git a/plugins/Contents/tests/System/expected/test_ContentscontentNameOrPieceMatch__Live.getLastVisitsDetails_day.xml b/plugins/Contents/tests/System/expected/test_ContentscontentNameOrPieceMatch__Live.getLastVisitsDetails_day.xml index 38f9ab1424..292d9feadf 100644 --- a/plugins/Contents/tests/System/expected/test_ContentscontentNameOrPieceMatch__Live.getLastVisitsDetails_day.xml +++ b/plugins/Contents/tests/System/expected/test_ContentscontentNameOrPieceMatch__Live.getLastVisitsDetails_day.xml @@ -14,6 +14,7 @@ <pageId>1</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -42,6 +43,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> @@ -117,6 +119,7 @@ <pageId>13</pageId> <generationTime>0.33s</generationTime> + <interactionPosition>1</interactionPosition> <timeSpent>271</timeSpent> <timeSpentPretty>4 min 31s</timeSpentPretty> <icon /> @@ -145,6 +148,7 @@ <visitDurationPretty>4 min 31s</visitDurationPretty> <searches>0</searches> <actions>1</actions> + <interactions>1</interactions> <referrerType>direct</referrerType> <referrerTypeName>Direct Entry</referrerTypeName> <referrerName /> |