{"id":16171268,"url":"https://github.com/loevgaard/dandomain-google-tag-manager","last_synced_at":"2025-10-03T16:11:51.400Z","repository":{"id":86462492,"uuid":"47267667","full_name":"loevgaard/dandomain-google-tag-manager","owner":"loevgaard","description":null,"archived":false,"fork":false,"pushed_at":"2016-01-13T14:33:20.000Z","size":86,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T07:48:22.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/loevgaard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-02T14:52:15.000Z","updated_at":"2020-04-20T09:27:44.000Z","dependencies_parsed_at":"2023-03-13T19:59:48.067Z","dependency_job_id":null,"html_url":"https://github.com/loevgaard/dandomain-google-tag-manager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/loevgaard/dandomain-google-tag-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loevgaard%2Fdandomain-google-tag-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loevgaard%2Fdandomain-google-tag-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loevgaard%2Fdandomain-google-tag-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loevgaard%2Fdandomain-google-tag-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loevgaard","download_url":"https://codeload.github.com/loevgaard/dandomain-google-tag-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loevgaard%2Fdandomain-google-tag-manager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260083863,"owners_count":22956409,"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-10-10T03:21:21.697Z","updated_at":"2025-10-03T16:11:46.357Z","avatar_url":"https://github.com/loevgaard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Javascript Library for Google Tag Manager on Dandomain\nDandomain is a Danish hosting provider who also hosts one of the biggest Danish webshop systems, [Dandomain Webshop](https://www.dandomain.dk/webshop/overblik).\n\nOn Dandomain we can't manipulate server side code so we can't populate the dataLayer variable before the DOM loads.\n\nThis library makes the process of integrating the Dandomain Webshop with Google Tag Manager a bit easier.\n\nIt consists of several \"modules\" or methods that will eventually populate the data layer with relevant values.\n\n## Implementation\n### Product Numbers\nThe library presumes that you use the default Dandomain product numbering scheme which is `[number]-[variant]` where `[number]` matches the regexp `[0-9]+` and `[variant]` matches the regexp `.*`. If you use another scheme, you have to implement the method `ddgtm.parseProductNumber()`.\n\n### Google Analytics Enhanced Ecommerce\nTo implement [Google Analytics Enhanced Ecommerce](https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce) features, use this code\n\n```html\n...\n\n\u003cscript\u003e\n$(function() {\n    ddgtm.analyticsEcommerce();\n    ddgtm.populateDataLayer();\n});\n\u003c/script\u003e\n\u003c/body\u003e\n```\n\nThis will fire an Google Tag Manager event named `ddgtm` which you can use to fire your tags within Google Tag Manager.\n\n#### Checkout Success\nInsert the following tags on the checkout success page (Design \u003e Tekster/knapper \u003e Bestil step 4 (Ordrebekræftelse))\n\n```html\n\u003c!-- ddgtm tracking variables --\u003e\n\u003cdiv id=\"ddgtm-order-id\" style=\"display:none\"\u003e[[OrderID]]\u003c/div\u003e\n\u003cdiv id=\"ddgtm-revenue\" style=\"display:none\"\u003e[[AdWordsSubTotalInclVAT]]\u003c/div\u003e\n\u003cdiv id=\"ddgtm-revenue-excl-vat\" style=\"display:none\"\u003e[[AdWordsSubTotalExclVAT]]\u003c/div\u003e\n\u003cdiv id=\"ddgtm-shipping\" style=\"display:none\"\u003e[[ShippingFeeInclVAT]]\u003c/div\u003e\n\u003cdiv id=\"ddgtm-currency\" style=\"display:none\"\u003e[[SubTotalInclVAT]]\u003c/div\u003e\n```\n\n![ddgtm checkout success parameters](doc/images/ddgtm-checkout-success.png)\n\n#### Product Template\nInsert the following tags on the product template\n\n```html\n\u003cdiv style=\"display:none\"\u003e[[Manufactors]]\u003c/div\u003e\n\u003cdiv id=\"ddgtm-category\" style=\"display:none\"\u003e[[ProdCatName]]\u003c/div\u003e\n```\n\n#### Product List Template\nInsert the following tags on the product list template\n\n```html\n\u003cdiv style=\"display:none\" class=\"brand\"\u003e[[Manufactors]]\u003c/div\u003e\n```\n\n### AdWords Dynamic Remarketing\n[AdWords Dynamic Remarketing](https://support.google.com/tagmanager/answer/6106009?hl=en)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floevgaard%2Fdandomain-google-tag-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floevgaard%2Fdandomain-google-tag-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floevgaard%2Fdandomain-google-tag-manager/lists"}