{"id":22743395,"url":"https://github.com/stape-io/stape-sgtm-nodejs","last_synced_at":"2025-08-18T04:04:39.200Z","repository":{"id":196157627,"uuid":"693113619","full_name":"stape-io/stape-sgtm-nodejs","owner":"stape-io","description":"Stape sGTM NodeJS SDK","archived":false,"fork":false,"pushed_at":"2025-02-12T15:03:37.000Z","size":284,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-18T00:44:25.064Z","etag":null,"topics":["gtm","gtm-server-side","nodejs","sdk","sdk-nodejs","sgtm","stape"],"latest_commit_sha":null,"homepage":"https://stape.io","language":"TypeScript","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/stape-io.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,"zenodo":null}},"created_at":"2023-09-18T11:29:28.000Z","updated_at":"2025-03-30T07:59:09.000Z","dependencies_parsed_at":"2025-04-14T08:51:39.366Z","dependency_job_id":"a6df63e8-f32e-4a54-be28-43e2b0a229b9","html_url":"https://github.com/stape-io/stape-sgtm-nodejs","commit_stats":null,"previous_names":["stape-io/stape-sgtm-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stape-io/stape-sgtm-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stape-io%2Fstape-sgtm-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stape-io%2Fstape-sgtm-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stape-io%2Fstape-sgtm-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stape-io%2Fstape-sgtm-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stape-io","download_url":"https://codeload.github.com/stape-io/stape-sgtm-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stape-io%2Fstape-sgtm-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270940719,"owners_count":24671687,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gtm","gtm-server-side","nodejs","sdk","sdk-nodejs","sgtm","stape"],"created_at":"2024-12-11T01:22:07.849Z","updated_at":"2025-08-18T04:04:39.103Z","avatar_url":"https://github.com/stape-io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stape sGTM NodeJS SDK\n\n## Getting Started\n\n### Configuration\n\nFill in the basic parameters:\n\n```javascript\nimport StapeSGTM, { transformations, EventData } from 'stape-sgtm-nodejs';\n\nconst sgtm = new StapeSGTM({\n  gtm_server_domain: 'https://gtm.stape.io',\n  request_path: '/data',\n });\n```\n\n| Variable          | Description             |\n|-------------------|-------------------------|\n| gtm_server_domain | Server host             |\n| request_path      | Request processing path |\n\n\n### Sending Event Data\n\n```javascript\nsgtm.sendEventData(\u003ceventName\u003e, \u003ceventData\u003e);\n```\n\n| Variable         | Description                             |\n|------------------|-----------------------------------------|\n| eventName        | Event name                              |\n| eventData        | Array of options for forming event data |\n\n\n**eventData**\n\n```javascript\nconst eventData = [{\n  page_hostname: 'Stape',\n  page_location: 'http://stape.io',\n}]\n```\n\n| Option | Description    |\n|--------|----------------|\n| name   | Variable name  |\n| value  | Variable value |\n\n####  Transformations\n\n| Option       | Description                                                |\n|--------------|------------------------------------------------------------|\n| trim         | Removes whitespace from the beginning and end of the value |\n| base64       | Encodes the string in Base64 format                        |\n| md5          | Encodes the string in MD5 format                           |\n| sha256base64 | Encodes the string in SHA256 Base64 format                 |\n| sha256hex    | Encodes the string in SHA256 HEX format                    |\n\n\n### Full Example\n\n```javascript\nimport StapeSGTM, { transformations, EventData } from 'stape-sgtm-nodejs';\n\nconst sgtm = new StapeSGTM({\n  gtm_server_domain: 'https://gtm.stape.io',\n  request_path: '/data',\n  preview_header: 'ZW52LTV8VTc5TlhtZkx3SHpIU004bEpyQWtRZ3wxOTRlMjZlOGJjZTViNTQ2OWI3NzM=',\n});\n\nconst eventData: EventData = {\n  client_id: '123456',\n  currency: 'USD',\n  ip_override: '79.144.123.69',\n  language: 'en',\n  page_encoding: 'UTF-8',\n  page_hostname: 'Stape',\n  page_location: 'http://stape.io',\n  page_path: '/',\n  user_data: {\n    sha256_email_address: transformations.sha256hex('jhonn@doe.com'),\n    phone_number: '123456769',\n    address: {\n      first_name: 'Jhon',\n    },\n  },\n};\n\nsgtm\n  .sendEventData('page_view', eventData)\n  .then((result) =\u003e console.log('🚀 ~ file: simple.ts:19 ~ result:', result))\n  .catch((error) =\u003e console.log('🚀 ~ file: simple.ts:21 ~ error:', error));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstape-io%2Fstape-sgtm-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstape-io%2Fstape-sgtm-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstape-io%2Fstape-sgtm-nodejs/lists"}