User story
Add an Addingwell integration module to proxy sGTM (Google Tag Manager) through a first-party domain. Trusted Server acts as a reverse proxy to the customer's *.adding-sst.com domain, allowing GTM tags to be served first-party and bypass ad blockers.
Implementation
Proxying
Any request to https://{{ host }}/integrations/addingwell/* must be forwarded to the configured *.adding-sst.com domain with the following rules:
- Remove the
/integrations/addingwell prefix from the path
- Forward all query parameters in the exact same order
- Forward all headers, especially region-related and IP-related ones
Script serving
The following snippet must be injected as high as possible in the <head> of every page:
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://{{ host }}/integrations/addingwell/{{ integration.addingwell.gtm_js_custom_name }}?awl='+i.replace(/^GTM-/, '')+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ integration.addingwell.gtm_id }}');</script>
And right after the opening <body> tag:
<noscript><iframe src="https://{{ host }}/integrations/addingwell/ns.html?id={{ integration.addingwell.gtm_id }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
Configuration
[integrations.addingwell]
enabled = true
# Proxy
sst_domain = "mywebsite" # .adding-sst.com
# Script serving
inject_scripts = true
gtm_id = "GTM-XXXXXXX"
gtm_js_custom_name = "xxxxxxxx.js" # default: gtm.js
Customer setup
On the Addingwell platform, the customer must:
- Create a container for their GTM ID
- Request a
*.adding-sst.com domain
- Grab the custom GTM filename from the CDN and set it as
gtm_js_custom_name/
User story
Add an Addingwell integration module to proxy sGTM (Google Tag Manager) through a first-party domain. Trusted Server acts as a reverse proxy to the customer's
*.adding-sst.comdomain, allowing GTM tags to be served first-party and bypass ad blockers.Implementation
Proxying
Any request to
https://{{ host }}/integrations/addingwell/*must be forwarded to the configured*.adding-sst.comdomain with the following rules:/integrations/addingwellprefix from the pathScript serving
The following snippet must be injected as high as possible in the
<head>of every page:And right after the opening
<body>tag:Configuration
Customer setup
On the Addingwell platform, the customer must:
*.adding-sst.comdomaingtm_js_custom_name/