diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-11-10 22:14:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 22:14:23 +0300 |
commit | 534c896cac2d9813b3e84a28f475ebd024e46095 (patch) | |
tree | 0674cade27d16c1bbe4349e866c18a35b9874ffa /plugins | |
parent | 5671139a7756ee04eb529a5ef64f56518a655dcb (diff) |
Adds new parameters for campaign group and placement to campaign builder (#16688)
Diffstat (limited to 'plugins')
5 files changed, 32 insertions, 0 deletions
diff --git a/plugins/MarketingCampaignsReporting b/plugins/MarketingCampaignsReporting -Subproject 544a4166d856739c88600e97815d87c1ba2c998 +Subproject c9a15f0cf0f9b7d1a0b09af1c0314875122098d diff --git a/plugins/Referrers/Referrers.php b/plugins/Referrers/Referrers.php index 211dad729c..172f2e6591 100644 --- a/plugins/Referrers/Referrers.php +++ b/plugins/Referrers/Referrers.php @@ -86,6 +86,10 @@ class Referrers extends \Piwik\Plugin $translationKeys[] = 'Referrers_CampaignContentHelp'; $translationKeys[] = 'Referrers_CampaignMedium'; $translationKeys[] = 'Referrers_CampaignMediumHelp'; + $translationKeys[] = 'Referrers_CampaignGroup'; + $translationKeys[] = 'Referrers_CampaignGroupHelp'; + $translationKeys[] = 'Referrers_CampaignPlacement'; + $translationKeys[] = 'Referrers_CampaignPlacementHelp'; $translationKeys[] = 'Referrers_CampaignPageUrlHelp'; $translationKeys[] = 'Referrers_CampaignNameHelp'; $translationKeys[] = 'Referrers_CampaignKeywordHelp'; diff --git a/plugins/Referrers/angularjs/campaign-builder/campaign-builder.controller.js b/plugins/Referrers/angularjs/campaign-builder/campaign-builder.controller.js index 2347d16feb..d3d089f95e 100644 --- a/plugins/Referrers/angularjs/campaign-builder/campaign-builder.controller.js +++ b/plugins/Referrers/angularjs/campaign-builder/campaign-builder.controller.js @@ -19,6 +19,8 @@ this.campaignSource = ''; this.campaignMedium = ''; this.campaignContent = ''; + this.campaignGroup = ''; + this.campaignPlacement = ''; this.generatedUrl = ''; }; @@ -66,6 +68,14 @@ this.generatedUrl += '&mtm_content='+encodeURIComponent(this.campaignContent.trim()); } + if (this.campaignGroup) { + this.generatedUrl += '&mtm_group='+encodeURIComponent(this.campaignGroup.trim()); + } + + if (this.campaignPlacement) { + this.generatedUrl += '&mtm_placement='+encodeURIComponent(this.campaignPlacement.trim()); + } + this.generatedUrl += urlHash; $('#urlCampaignBuilderResult').effect("highlight", {}, 1500); diff --git a/plugins/Referrers/angularjs/campaign-builder/campaign-builder.directive.html b/plugins/Referrers/angularjs/campaign-builder/campaign-builder.directive.html index dbc68e07e3..ac87c1cc28 100644 --- a/plugins/Referrers/angularjs/campaign-builder/campaign-builder.directive.html +++ b/plugins/Referrers/angularjs/campaign-builder/campaign-builder.directive.html @@ -40,6 +40,20 @@ inline-help="{{'Goals_Optional'|translate}} {{'Referrers_CampaignContentHelp'|translate}}"> </div> + <div piwik-field uicontrol="text" name="campaigngroup" + data-title="{{ 'Referrers_CampaignGroup'|translate }}" + ng-model="campaignBuilder.campaignGroup" + ng-show="campaignBuilder.hasExtraPlugin" + inline-help="{{'Goals_Optional'|translate}} {{'Referrers_CampaignGroupHelp'|translate}}"> + </div> + + <div piwik-field uicontrol="text" name="campaignplacement" + data-title="{{ 'Referrers_CampaignPlacement'|translate }}" + ng-model="campaignBuilder.campaignPlacement" + ng-show="campaignBuilder.hasExtraPlugin" + inline-help="{{'Goals_Optional'|translate}} {{'Referrers_CampaignPlacementHelp'|translate}}"> + </div> + <div piwik-save-button class="generateCampaignUrl" onconfirm="campaignBuilder.generateUrl()" diff --git a/plugins/Referrers/lang/en.json b/plugins/Referrers/lang/en.json index bb3efec479..72223ca529 100644 --- a/plugins/Referrers/lang/en.json +++ b/plugins/Referrers/lang/en.json @@ -14,6 +14,10 @@ "CampaignContentHelp": "This parameter is often used when you are testing multiple ads, and would include the name of each ad to see which was most effective for driving traffic.", "CampaignMedium": "Campaign Medium", "CampaignMediumHelp": "Used to describe the marketing activity, for example 'PPC' for a pay-per-click campaign, or 'SEM' for a paid search ads, or 'review' to track a product review on an affiliate site.", + "CampaignGroup": "Campaign Group", + "CampaignGroupHelp": "This parameter is used to track a Campaign Group to identify a group or audience. Campaign groups are helpful for tracking the overall performance of multiple campaigns with similar goals.", + "CampaignPlacement": "Campaign Placement", + "CampaignPlacementHelp": "Used to describe the advertising placement or position, for example an entire website, specific pages from a website, an individual ad unit positioned on a single page, a video, a mobile phone app, and more.", "ColumnSearchEngine": "Search Engine", "ColumnSocial": "Social network", "ColumnWebsite": "Website", |