Skip to content

Commit

Permalink
Merge pull request #964 from matomo-org/PG-3794-add-note-custom-html
Browse files Browse the repository at this point in the history
Adds a note in CustomHTML tag for remarketing consent, #PG-3794
  • Loading branch information
AltamashShaikh authored Dec 20, 2024
2 parents 8462f7d + daaa041 commit 23fc15f
Show file tree
Hide file tree
Showing 17 changed files with 110 additions and 86 deletions.
1 change: 1 addition & 0 deletions TagManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ public function getClientSideTranslationKeys(&$result)
$result[] = 'TagManager_TriggerLowercase';
$result[] = 'TagManager_VariableLowercase';
$result[] = 'TagManager_LearnMoreFullStop';
$result[] = 'TagManager_CustomHTMLTagNameInlineHelpText';
}

public function getStylesheetFiles(&$stylesheets)
Expand Down
3 changes: 2 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@
"CopyContainerNote": "%1$sNote:%2$s The copied container may need adjustments if it includes custom code or references specific to the original website. Review settings to ensure compatibility.",
"CopyXDescription": "To duplicate this %1$s, select the website and container you’d like to add the %1$s to. This will create an exact copy of all settings of the %1$s.",
"CopyXSuccess": "A copy was successfully created. %1$sNavigate to the new %2$s now%3$s.",
"LearnMoreFullStop": "%1$sLearn more%2$s."
"LearnMoreFullStop": "%1$sLearn more%2$s.",
"CustomHTMLTagNameInlineHelpText": "%1$sNote:%2$s If you are targeting users in Europe, be aware that triggering retargeting tags like Google Ads Remarketing requires user consent under GDPR. %3$sLearn more%4$s."
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/UI/expected-screenshots/ContainerTag_edit_url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 67 additions & 57 deletions vue/dist/TagManager.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vue/dist/TagManager.umd.min.js

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions vue/src/Tag/TagEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
@update:model-value="tag.name = $event; setValueHasChanged()"
:maxlength="255"
:title="translate('General_Name')"
:inline-help="translate('TagManager_TagNameHelpV2')"
:inline-help="tagNameHelpText"
:placeholder="translate('TagManager_TagNamePlaceholder')"
/>
</div>
Expand Down Expand Up @@ -336,7 +336,7 @@ import {
NotificationsStore,
NotificationType,
clone,
MatomoUrl,
MatomoUrl, externalLink,
} from 'CoreHome';
import { Field, SaveButton, GroupedSettings } from 'CorePluginsAdmin';
import AvailableFireLimitsStore from '../AvailableFireLimit.store';
Expand Down Expand Up @@ -831,6 +831,18 @@ export default defineComponent({
translate('TagManager_OnceLifetime'),
);
},
tagNameHelpText() {
let additionalHelpText = '';
console.log(this.tag);
if (this.tag.type === 'CustomHtml') {
additionalHelpText = translate('TagManager_CustomHTMLTagNameInlineHelpText',
'<br><br><strong>',
'</strong>',
externalLink('https://matomo.org/faq/tag-manager/how-to-add-google-ads-remarketing-tags-in-matomo-tag-manager/'),
'</a>');
}
return translate('TagManager_TagNameHelpV2') + additionalHelpText;
},
},
});
</script>

0 comments on commit 23fc15f

Please sign in to comment.