Marketing tags are snippets of code that you insert on Web pages. Tags typically collect analytics information such as how many visitors view the page and how long they stay. Tags can also integrate third-party content such as social media on your site or insert ad campaigns. You can use tags to learn more about visitors or provide content.
Maven is the easiest way to install the module. Add the following to your bundle
The Marketing Tags module is an Enterprise Edition module. If you work with the Community Edition you can include code snippets on your pages as resource files.
Include the code snippet as a resource file in your project.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1234567-2"></script>
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
Use the Freemarker
include directive in your template script, as if you were referencing another script.
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))