Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for goal attribution #120

Open
wants to merge 11 commits into
base: 4.x-dev
Choose a base branch
from
1 change: 1 addition & 0 deletions Reports/GetContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignContent();
$this->name = Piwik::translate('MarketingCampaignsReporting_Contents');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 5;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignGroup();
$this->name = Piwik::translate('MarketingCampaignsReporting_Groups');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 8;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetId.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignId();
$this->name = Piwik::translate('MarketingCampaignsReporting_CampaignIds');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 7;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetKeyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignKeyword();
$this->name = Piwik::translate('MarketingCampaignsReporting_Keywords');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 2;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetMedium.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignMedium();
$this->name = Piwik::translate('MarketingCampaignsReporting_Mediums');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 4;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetName.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ protected function init()
{
parent::init();
$this->dimension = new CampaignName();
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->name = Piwik::translate('MarketingCampaignsReporting_Names');
$this->actionToLoadSubTables = 'getKeywordContentFromNameId';
$this->hasGoalMetrics = true;
Expand Down
1 change: 1 addition & 0 deletions Reports/GetPlacement.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignPlacement();
$this->name = Piwik::translate('MarketingCampaignsReporting_Placements');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 9;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignSource();
$this->name = Piwik::translate('MarketingCampaignsReporting_Sources');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->hasGoalMetrics = true;
$this->order = 3;

Expand Down
1 change: 1 addition & 0 deletions Reports/GetSourceMedium.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ protected function init()
parent::init();
$this->dimension = new CampaignSourceMedium();
$this->name = Piwik::translate('MarketingCampaignsReporting_CombinedSourcesMediums');
$this->documentation = '<b>' . Piwik::translate('MarketingCampaignsReporting_AttributionTitle') . ':</b> ' . Piwik::translate('MarketingCampaignsReporting_AttributionDocumentation', ['<a href="https://matomo.org/faq/general/faq_106/" rel="noreferrer noopener" target="_blank">', '</a>']);
$this->actionToLoadSubTables = 'getNameFromSourceMediumId';
$this->hasGoalMetrics = true;
$this->order = 6;
Expand Down
2 changes: 2 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"MarketingCampaignsReporting": {
"AttributionTitle": "Attribution",
"AttributionDocumentation": "By default, conversion metrics in tables with Goal metrics are attributed to the last non-direct channel that brought visitors who converted. %1$sLearn more%2$s about conversion attribution.",
"Name": "Campaign Name",
"Keyword": "Campaign Keyword",
"Source": "Campaign Source",
Expand Down
11 changes: 10 additions & 1 deletion tests/UI/Reports_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ describe("MarketingCampaignsReporting_Reports", function () {
expect(await page.screenshotSelector('.pageWrap,.expandDataTableFooterDrawer')).to.matchImage('loaded');
});

it('should show iconBar with info', async function () {
await page.evaluate(function() {
$('.card-title .iconsBar').show();
$('.card-title .iconsBar .helpIcon').click();
$('.card-title .helpDate').html('');
});
expect(await page.screenshot()).to.matchImage('icon_with_info');
});

it('should show visits log with campaign details', async function() {
await page.goto("?module=CoreHome&action=index&idSite=1&period=month&date=2013-01-23#?idSite=1&period=month&date=2013-01-23&category=General_Visitors&subcategory=Live_VisitorLog");

Expand All @@ -27,4 +36,4 @@ describe("MarketingCampaignsReporting_Reports", function () {
var report = await page.$('.reporting-page');
expect(await report.screenshot()).to.matchImage('visitor_log');
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.