{"id":13766372,"url":"https://github.com/webmatch/WbmTagManager","last_synced_at":"2025-05-10T21:33:28.525Z","repository":{"id":16801046,"uuid":"80517244","full_name":"webmatch/WbmTagManager","owner":"webmatch","description":"Shopware 5 Plugin for Google Tag Manager integration and dataLayer configuration","archived":false,"fork":false,"pushed_at":"2023-12-15T22:31:53.000Z","size":234,"stargazers_count":27,"open_issues_count":6,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-18T13:07:56.273Z","etag":null,"topics":["datalayer","datalayer-configuration","google-tag-manager","shopware","shopware-plugin"],"latest_commit_sha":null,"homepage":"","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/webmatch.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}},"created_at":"2017-01-31T12:12:06.000Z","updated_at":"2024-02-26T09:17:06.000Z","dependencies_parsed_at":"2024-08-03T16:14:25.944Z","dependency_job_id":null,"html_url":"https://github.com/webmatch/WbmTagManager","commit_stats":{"total_commits":196,"total_committers":15,"mean_commits":"13.066666666666666","dds":0.4897959183673469,"last_synced_commit":"85b6c36ece165fcfc010b2d07401030ecc7ea0d6"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatch%2FWbmTagManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatch%2FWbmTagManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatch%2FWbmTagManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatch%2FWbmTagManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webmatch","download_url":"https://codeload.github.com/webmatch/WbmTagManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253486336,"owners_count":21916136,"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":["datalayer","datalayer-configuration","google-tag-manager","shopware","shopware-plugin"],"created_at":"2024-08-03T16:00:54.604Z","updated_at":"2025-05-10T21:33:28.065Z","avatar_url":"https://github.com/webmatch.png","language":"PHP","funding_links":[],"categories":["PHP","Tracking"],"sub_categories":[],"readme":"WbmTagManager - GTM integration and dataLayer configuration\n=====\n[![Scrutinizer](https://scrutinizer-ci.com/g/webmatch/WbmTagManager/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/webmatch/WbmTagManager/?branch=master)\n[![Travis CI](https://travis-ci.org/webmatch/WbmTagManager.svg?branch=master)](https://travis-ci.org/webmatch/WbmTagManager)\n\nThis plugin integrates a new module within the [Shopware](https://www.shopware.de) backend that allows for the integration \nof the Google Tag Manager Snippet and the configuration of the dataLayer content.\n\n![WbmTagManager](https://www.webmatch.de/wp-content/uploads/2017/02/tag_manager_screen.png)\n\nThe plugin offers the following features:\n\n* Prepend the GTM Snippet to the head Tag of every page\n* Define the content of the dataLayer for any combination of Module/Controller/Action\n* All variables passed to the view are available as values for the dataLayer properties\n* Use smarty syntax to insert variables and alter values\n\nRequirements\n-----\n* Shopware \u003e= 5.6.3\n\nInstallation\n====\nClone this repository into a folder **WbmTagManager** within the **custom/plugins** directory of the Shopware installation.\n\n* Install the plugin through the Plugin-Manager within the Shopware backend. \n* Enter the container ID of the desired GTM Container (found in the GTM backend)\n* Activate the plugin and when prompted allow for the clearing of the listed caches.\n* Reload the backend to complete the installation.\n\n## Install with composer\n* Change to your root Installation of shopware\n* Run command `composer require webmatch/wbm-tag-manager` and install and activate plugin with Plugin Manager \n\nUsage\n=====\nThe module will be accessible in backend through a new menu point under the Settings menu tab.\n\nThe plugin comes pre-configured for:\n* Enhanced Ecommerce Tracking of Google Analytics\n* Dynamic Remarketing of Google AdWords\n\nUse syntax like \"$sArticles as $sArticle\" as value for properties that are supposed to contain iterative elements.\n\nAdding modules\n=====\nModules are essentially configurations of a dataLayer for a specific view, meaning sites of more or less the same type.\n\nSince version 3.0.0 there's a new UI for adding new modules, as well as updating and deleting existing modules.\n\nWhen adding new modules you're prompted to enter a name (what the new tab will read) and a key for the module.\n\nThe key must contain the values for module, controller and action, connected by underscores. \nSee the [Shopware documentation](https://developers.shopware.com/developers-guide/controller/#controller-and-urls) \nfor a more detailed explanation. The key must also be all lowercase.\n\nAfter adding a module you will find a new tab in the main window, where you can declare the properties for the\ndataLayer of that specific view.\n\nAdditional Smarty functions\n=====\n\n{dbquery}\n-----\n\nSince version 3.0.0 a new Smarty function `{dbquery}` is available for the compiling of dataLayers. The function allows you to fetch a single value\nfrom any database table. You can pass one or multiple criterias to be used in `WHERE` and `ORDER BY` statements.\n\nThe following example will work in the dataLayer of the \"Add to basket\" module and will fetch the price of the newly added product.\n\n```\n{dbquery select='price' from='s_order_basket' where=['ordernumber =' =\u003e $smarty.request.sAdd, 'sessionID =' =\u003e $smarty.session.Shopware.sessionId] order=['id' =\u003e 'DESC']}\n```\n\nPlease note the use of single quotes only and the array arguments.\n\nAlso be aware that this feature is reliant on proper syntax, meaning you have to pass an operator with the column name and the \ncolumns as well as the values have to exist. Syntax errors will be caught and will result in an empty string to be returned instead.\n\n{request_get}\n-----\n\nRequest parameters won't be available utilizing `$smarty.request` if they have been set during dispatch or through sluggified URLs (e.g. `/detail/index/sArticle/123`).\nBy using `request_get` and the `param` argument you can get any parameter available at the time of the dataLayer compiling.\n\n```\n{request_get param='sDelete'}\n```\n\n{*|to_string}\n-----\n\nThe modifier `to_string` will force casting of a value to string. The default behaviour is to try and determine the type of\na value by json decoding. If a numeric value should still be recognized as a string, use the modifier after the variable or value.\nIf you're chaining multiple modifiers, make sure to always use `to_string` in last place.\n\n```\n{123|to_string}\n=\u003e\n\"123\"\n```\n\nTracking URL Parameters\n=====\n\nTo track URL parameters (e.g. for campaigns) throughout the user journey, you can set up parameters that\nwill be temporary saved in the session for use in the dataLayer configuration. \nWithin the plugin configuration you can define a comma separated list of GET parameters (e.g. `utm_campaign`, `gclid`, etc).\nThose parameters can then be used in the dataLayer configuration by reading the session:\n`{$smarty.session.Shopware.wbmTagManager.nameOfTheParameter}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmatch%2FWbmTagManager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmatch%2FWbmTagManager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmatch%2FWbmTagManager/lists"}