{"id":19163829,"url":"https://github.com/elbwalker/sgtm-client-template","last_synced_at":"2026-02-09T23:01:50.951Z","repository":{"id":110077831,"uuid":"572168721","full_name":"elbwalker/sgtm-client-template","owner":"elbwalker","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-05T13:19:24.000Z","size":126,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-08T19:15:18.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elbwalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-11-29T17:41:12.000Z","updated_at":"2025-01-01T22:09:03.000Z","dependencies_parsed_at":"2024-06-05T15:08:12.693Z","dependency_job_id":"4124bcb1-465c-4ece-be2f-07fc8e39c505","html_url":"https://github.com/elbwalker/sgtm-client-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elbwalker/sgtm-client-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbwalker%2Fsgtm-client-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbwalker%2Fsgtm-client-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbwalker%2Fsgtm-client-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbwalker%2Fsgtm-client-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elbwalker","download_url":"https://codeload.github.com/elbwalker/sgtm-client-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elbwalker%2Fsgtm-client-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29284738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-09T09:16:49.937Z","updated_at":"2026-02-09T23:01:50.940Z","avatar_url":"https://github.com/elbwalker.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://elbwalker.com\"\u003e\n    \u003cimg title=\"elbwalker\" src='https://www.elbwalker.com/img/elbwalker_logo.png' width=\"300px\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# elbwalker Server Side Google Tag Manager Custom Client Template\nCustom client template for Server Side Google Tag Manager (SGTM).  \nReceives walker.js events and optionally serves walker.js script. Optimized for use as gtag.js replacement for GA4.  \n\nFeatures:\n\n* Serving your walker.js script through SGTM\n* Automatic Session and Client ID handling\n* Event name processing\n* Advanced settings for custom event model mapping\n* GA4 specific settings\n\n[![Beta Status](https://img.shields.io/badge/Status-Beta-yellow.svg)](https://shields.io/)\n\n## Installation\n\n\u003cdetails\u003e\n\u003csummary\u003eShow installation instructions\u003c/summary\u003e\nThis template is not yet available in SGTM's Community Gallery due to currently long review times. Instead, you can install it manually by following these steps:\n\n1. Download this repository by clicking the green \"Code\" button and selecting \"Download ZIP\".  \n    \u003ca href=\"https://user-images.githubusercontent.com/6085647/206726857-7cbcce43-6ebc-4249-a593-14e87e044a72.png\"\u003e\n        \u003cimg title=\"elbwalker\" src='https://user-images.githubusercontent.com/6085647/206726857-7cbcce43-6ebc-4249-a593-14e87e044a72.png' width=\"300px\"/\u003e\n    \u003c/a\u003e\n2. Unzip the downloaded file.\n3. In the SGTM UI, click the *Templates* menu item and in the *Client Templates* section click *New*.\n4. Click the \"Import\" button in the context menu and select the `template.tpl` file from the unzipped folder.\n    \u003ca href=\"https://user-images.githubusercontent.com/6085647/206726854-62f5f083-fb3d-4b4c-9fec-29d0cbc11e0f.png\"\u003e\n        \u003cimg title=\"elbwalker\" src='https://user-images.githubusercontent.com/6085647/206726854-62f5f083-fb3d-4b4c-9fec-29d0cbc11e0f.png' width=\"300px\"/\u003e\n    \u003c/a\u003e\n\u003c/details\u003e\n\n## Client Configuration\nAfter installing the template, a new client can be created in SGTM. The client has several groups of settings.\n\n### walker.js Proxy \u0026 1st party serving\n[walker.js](https://github.com/elbwalker/walker.js) is the script that you'll need to load to collect data in the browser and send it to SGTM.  \n\nIf you don't want to host a copy of walker.js on your own, the SGTM client will load the specified version from JSDELIVR's CDN and proxy it through your SGTM. This makes walker.js available in a first party context, if your SGTM runs on a first party domain.  \nYou can define the behavior of the proxy in the client configuration:\n\n* **Maximum Cache Age**:  \nThe client uses SGTM template storage to cache the script. This setting defines the maximum age of the cached script in milliseconds.\n* **Path**:  \nAllows you to choose a custom filename, if you don't want to use `/walker.js`.\n* **Version**:  \nThe version of walker.js to load from CDN. Only select \"latest\" during development and testing. In production, always use a specific version number to avoid unexpected breaking changes.\n\n### Session \u0026 Client IDs\nDepending on your usage and client-side utilization of walker events and user / session handling, there are several ways of extracting a session id, number (mainly for the use with GA4) and a client id. \n\nThe minimal needed identifier would be a session id that can be used in order to have a common id for every hit that belongs to the same session / browser / visit. If there is no client id, the session id will serve as fallback. \n\nChoose between cookies, walker event data or a custom definition for getting session and client data. In every case you can define how incoming events should be handled when setting:\n\n- session id\n- session number\n- client id\n\n### Event Name Processing\nwalker.js events usually have a different format than the tags in SGTM expect.  \nAs most tags expect an incoming GA4 stream, you can use different methods for adjusting event names. The easy way is to replace all whitepaces with an \"_\" and lowercase the event name. This would make a \"page view\" from elwalker to appear as \"page_view\" in the SGTM event model. \n\nAlternatively you can translate every incoming event name to a new one in order to match your requirements. \n\n### Advanced Settings\nThe advanced section allows to define different parameters that control what happens with incoming requests. It is possible to include a fully nested copy of the walker.js event in the event model. This might be useful if you want to forward all event data directly into a first party database like Google BigQuery. Or in case that specific data should be extracted from the event and used to provide values for an advanced tag configuration.\n\nAdding information from the \"context\" and \"globals\" section of incoming events can be used to create a \"flat\" event model that might fit your needs in a better way than the client template automatically maps some of the (expected) event properties (for a page_location, page_title, page_referrer and others for example).\n\n#### GA4 Specific Settings\nThe client expects a **marker for detecting a new session** somewhere in the incoming event data. The default path can be changed to sync the client with your implementation. Any \"truthy\" value in this parameter will trigger a new session and the client sets a session_start marker (and a first_visit marker as well if the session number equals \"1\") so GA4 can create the according events needed for attribution and populating source and medium dimensions in GA4.   \n\nwalker.js has a \"nested\" object that can contain e-commerce items. If you plan to **process e-commerce events** and forward them to GA4, check the option to convert \"nested\" information to \"items\" and pick a nested object type.\n\ngtag.js usually knows, what events are conversions and sends this information as a marker to GA4 (or a custom endpoint like SGTM). When using this client to feed GA4, you will have to let SGTM know what events to handle as a conversion by **defining conversion event names**. Use the list in the client setup to add event names (obe per row) in the same format that the client will generate (after all changes defined in \"Event Name Processing\" options.)  \n\n## Why Beta?\nThere are still some things that have to be manually added in any existing implementation in order to fit the client`s expectations about what information gets sent in which section of incoming events. See help for every configuration field in this client for more information. \n\nwalker.js will make the use of this client as easy as possible. Still, using walker.js for GA4 needs some additional information (see example). If you run into any problems or have ideas how to enhance this client, feel free to contribute or [open an issue](https://github.com/elbwalker/sgtm-client-template/issues/new)!\n\n## Release Notes\n*2024-06-05*\n- added compression for walker.js\n\n*2024-01-23*\n- changed default walker.js version to 2.0.0\n- adjustments for receiving and setting version information to fit 2.x (still compatible with older versions)\n- processing options for `custom` object from walker.js 2.x\n\n*2024-04-24*\n- **IMPORTANT**: changed method for defining sources for session ID, session number, client ID \u0026 session starts\n- no Universal Analytics event parameters `action`, `category`, `label`  \n- fixed error when getting session number from cookie\n\n## Contact\nContact [elbwalker](https://www.elbwalker.com/) for anything about walker.js implementation or reach out to [Markus Baersch](https://github.com/mbaersch) or [Justus Blümer](https://github.com/justusbluemer) about anything regarding this client template. \n\n**Happy Tagging!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felbwalker%2Fsgtm-client-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felbwalker%2Fsgtm-client-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felbwalker%2Fsgtm-client-template/lists"}