{"id":23428325,"url":"https://github.com/typo3gmbh/ext-usercentrics","last_synced_at":"2025-04-12T20:20:58.506Z","repository":{"id":44535408,"uuid":"246088878","full_name":"TYPO3GmbH/ext-usercentrics","owner":"TYPO3GmbH","description":"This extension integrates Usercentrics (Compliance and Consent Management) into TYPO3.","archived":false,"fork":false,"pushed_at":"2023-07-10T07:42:14.000Z","size":147,"stargazers_count":4,"open_issues_count":9,"forks_count":6,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-03-26T14:38:46.532Z","etag":null,"topics":["consent","consent-management","typo3","usercentrics"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TYPO3GmbH.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-09T16:38:28.000Z","updated_at":"2023-07-10T06:38:43.000Z","dependencies_parsed_at":"2024-12-23T07:12:11.282Z","dependency_job_id":"2efb1099-6407-4bd7-a65d-6213efaa3ec9","html_url":"https://github.com/TYPO3GmbH/ext-usercentrics","commit_stats":{"total_commits":34,"total_committers":6,"mean_commits":5.666666666666667,"dds":0.5294117647058824,"last_synced_commit":"7a933359b7b17fec6c757814b9b50fe9c9932a73"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3GmbH%2Fext-usercentrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3GmbH%2Fext-usercentrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3GmbH%2Fext-usercentrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TYPO3GmbH%2Fext-usercentrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TYPO3GmbH","download_url":"https://codeload.github.com/TYPO3GmbH/ext-usercentrics/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248626379,"owners_count":21135653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consent","consent-management","typo3","usercentrics"],"created_at":"2024-12-23T07:12:01.487Z","updated_at":"2025-04-12T20:20:58.429Z","avatar_url":"https://github.com/TYPO3GmbH.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usercentrics Integration for TYPO3\n\nThis extension integrates Usercentrics (Compliance and Consent Management) into TYPO3.\n\n## Installation and Configuration\n\n1. Download and install the extension from the TER or via composer:\n\n    * TER: https://extensions.typo3.org/extension/usercentrics\n    * Composer: composer require t3g/usercentrics\n\n2. Activate the extension in the extension manager\n\n3. On every site where you want to use the extension, include the static TypoScript setup\n\n4. Configure your Usercentrics ID by setting `plugin.tx_usercentrics.settingsId = \u003cyour-id\u003e` in your TypoScript setup\n\n5. Configure the JS Files to be handled by Usercentrics:\n\n```\nplugin.tx_usercentrics {\n    settingsId = {$plugin.tx_usercentrics.settingsId}\n    jsFiles {\n\n        # Path to JS File (required)\n        10.file = EXT:site/Resources/Public/JavaScriyt/MyScriptFile.js\n\n        # Identifier to use in Usercentrics (required)\n        10.dataProcessingService = My Data Processing Service\n\n        20.file = secondFile.js\n        20.dataProcessingService = My other Data Processing Service\n\n        # attributes for the script tag (optional)\n        20.attributes {\n            async = async\n        }\n\n        # options for the TYPO3 AssetCollector\n        # setting priority will render the script in the head instead of the footer section\n        20.options {\n            priority = 1\n        }\n    }\n\n    jsInline {\n      10.value (\n        alert(123);\n      )\n      10.dataProcessingService = My Data Processing Service\n      10.attributes {\n        custom = attribute\n      }\n    }\n}\n```\n\nNote that the configured identifiers need to match your Usercentrics configuration.\n\nYou do not need to set the `type` or `data-usercentrics` attributes for the script tags, the extension will handle that for you.\n\n## Usage in Fluid\n\nThe extension comes with a custom view helper which can be used to add scripts via Fluid:\n\n```html\n\u003cusercentrics:script dataProcessingService=\"identifier123\" src=\"EXT:my_ext/Resources/Public/JavaScript/foo.js\" /\u003e\n\u003cusercentrics:script dataProcessingService=\"identifier123\"\u003e\n   alert('hello world');\n\u003c/usercentrics:script\u003e\n```\n\n## Integrate Usercentrics with PHP\n\nSince TYPO3 v10 the AssetCollector is part of the TYPO3 Core API. To add scripts managed by Usercentrics via PHP, replace your previous calls to the `PageRenderer` with `AssetCollector` calls and make sure to\nset the attributes `type=text/plain` and `data-usercentrics=identifer`.\n\nExample:\n\n```\n    $dataProcessingService = 'My Data Processing Service';\n    $identifier = \\TYPO3\\CMS\\Core\\Utility\\StringUtility::getUniqueId($dataProcessingService . '-');\n    $file = 'EXT:site/Resources/Public/JavaScript/Scripts.js';\n    $attributes = [\n        'type' =\u003e 'text/plain',\n        'data-usercentrics' =\u003e $dataProcessingService\n    ];\n    $assetCollector = GeneralUtility::makeInstance(AssetCollector::class);\n    $assetCollector-\u003eaddJavaScript($identifier, $file, $attributes);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypo3gmbh%2Fext-usercentrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypo3gmbh%2Fext-usercentrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypo3gmbh%2Fext-usercentrics/lists"}