Zum Hauptinhalt springen Skip to page footer

Include Static und Sprachdateien

Cookieman (cookieman)

Cookieman (Example configuration of groups and tracking oobjects)

 

Aktualisiere Sprachdateien

Impressum und Datenschutz

plugin.tx_cookieman.settings.links.dataProtectionDeclarationPid = {$pid.dataprotection}
plugin.tx_cookieman.settings.links.imprintPid = {$pid.imprint}
constants.typoscript

Typoscript-Konfiguration (google Analytics)

# include definition of TrackingObjects
@import 'EXT:cookieman/Configuration/TypoScript/TrackingObjects/*.typoscript'

plugin.tx_cookieman {
    # see documentation: https://github.com/dmind-gmbh/extension-cookieman
    settings {
        groups {
            # extend group (already configured in the base template)
            mandatory {
                trackingObjects {
                    10 = fe_typo_user
                }
            }

            # a new group
            marketing {
                trackingObjects {
                    0 >
                    10 = GoogleAnalytics
                    20 >
                    30 >
                    40 >
                    50 >
                    60 >
                }

                respectDnt = 1
                showDntMessage = 1
            }

            # external content
            external {
                trackingObjects {
                    0 = GoogleMaps
                    10 = YouTube
                    20 >
                    30 = Vimeo
                }

                respectDnt = 1
                showDntMessage = 1
            }
        }
    }
}

# 3. Add the tracking code to the TrackingObject:
plugin.tx_cookieman.settings.trackingObjects {
    GoogleAnalytics {
        inject (
        <script>
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

            ga('create', 'UA-XXXXXXXX-X', 'auto');
            ga('send', 'pageview');
        </script>
        )
    }
}
cookieman.typoscript