{"id":20961731,"url":"https://github.com/heimrichhannot/contao-google-tag-manager-bundle","last_synced_at":"2025-07-16T19:34:13.342Z","repository":{"id":62515492,"uuid":"136134393","full_name":"heimrichhannot/contao-google-tag-manager-bundle","owner":"heimrichhannot","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-08T07:35:42.000Z","size":203,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-22T02:43:10.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimrichhannot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-06-05T07:02:12.000Z","updated_at":"2023-02-08T09:09:00.000Z","dependencies_parsed_at":"2025-05-14T07:44:45.486Z","dependency_job_id":null,"html_url":"https://github.com/heimrichhannot/contao-google-tag-manager-bundle","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/heimrichhannot/contao-google-tag-manager-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-google-tag-manager-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-google-tag-manager-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-google-tag-manager-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-google-tag-manager-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimrichhannot","download_url":"https://codeload.github.com/heimrichhannot/contao-google-tag-manager-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-google-tag-manager-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265534751,"owners_count":23783882,"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":[],"created_at":"2024-11-19T02:16:03.288Z","updated_at":"2025-07-16T19:34:13.321Z","avatar_url":"https://github.com/heimrichhannot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contao Google Tag Manager Bundle\n\n![](https://img.shields.io/packagist/v/heimrichhannot/contao-google-tag-manager-bundle.svg)\n![](https://img.shields.io/packagist/dt/heimrichhannot/contao-google-tag-manager-bundle.svg)\n[![](https://img.shields.io/travis/heimrichhannot/contao-google-tag-manager-bundle/master.svg)](https://travis-ci.org/heimrichhannot/contao-google-tag-manager-bundle/)\n[![](https://img.shields.io/coveralls/heimrichhannot/contao-google-tag-manager-bundle/master.svg)](https://coveralls.io/github/heimrichhannot/contao-google-tag-manager-bundle)\n\n## Setup\n\n1. Install with composer or contao manager\n\n        composer require heimrichhannot/contao-google-tag-manager-bundle\n\n1. Update your database\n\n1. Adjust your fe_page template\n    * Add `\u003c?= $this-\u003egoogleTagManagerHead ?\u003e` to your head section\n    * Add `\u003c?= $this-\u003egoogleTagManagerBody ?\u003e` to before the body closing tag\n\n## Advanced usage\n\n### add data layer variables to a page\n\n`System::getContainer()-\u003eget('huh.google_tag_manager.data_layer')-\u003esetContent(['key' =\u003e 'value']);`\n\n### add an a tag with data layer event handler\n\n`System::getContainer()-\u003eget('huh.google_tag_manager.tag_manager')-\u003egetLink(class, link, linkText, ['event': 'button1-click'])`\n\nThis will output: `\u003ca href=\"link\" class=\"class\" onclick=\"dataLayer.push({'event': 'button1-click'});\"\u003elinkText\u003c/a\u003e`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-google-tag-manager-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimrichhannot%2Fcontao-google-tag-manager-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-google-tag-manager-bundle/lists"}