Skip to main content
TagManifest /Docs Dashboard

Ecommerce tools via Custom HTML

Custom HTML tags implement ecommerce marketing platform integrations (Klaviyo, Segment, Braze, Iterable, mParticle, Omnisend, Drip, Attentive). Custom HTML implementations are harder to maintain, debug, and audit than native GTM templates.

On this page 6

Summary

  • rule_id — ecommerce-tool-custom-html
  • purpose — Detect ecommerce marketing platform integrations implemented via Custom HTML tags
  • effect — Custom HTML implementations are harder to maintain, audit, and keep consent-compliant than native GTM templates or server-side alternatives
  • layer — container
  • reversibility — non-destructive

What fires this

The rule iterates active, non-paused Custom HTML tags and tests each against the shared ECOMMERCE_TOOLS list. Detection uses two methods in sequence: parser-side codeAnalysis flags (e.g., codeAnalysis.hasKlaviyo) and a regex pattern fallback on the raw tag code. The tool list covers Klaviyo, Segment, Braze, Iterable, mParticle, Omnisend, Drip, and Attentive. A tag matching either method is flagged. Consent gaps in the same tags are a separate finding handled by ecommerce-tool-consent.

Why it matters

Custom HTML implementations of marketing platforms are harder to maintain and audit than native templates or server-side integrations. When a vendor updates its API or initialization signature, a Custom HTML tag must be updated manually; a native GTM (Google Tag Manager) template typically receives updates from the template author. Custom HTML also provides no built-in consent hooks — the tag fires unconditionally unless a CMP (consent management platform) blocks it at the page level. Segment and Braze both have official GTM Community Template Gallery entries. Platforms without templates can be moved to server-side GTM for better data control.

Before / after

// Custom HTML tag: "Klaviyo — Init"
var klaviyoScript = document.createElement('script')
klaviyoScript.src = 'https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=ABC123'
document.head.appendChild(klaviyoScript)

klaviyo.track('Viewed Product', {
  ProductName: {{DLV - product_name}},
  ProductID: {{DLV - product_id}}
})
// Option A: Klaviyo tag via GTM Community Template Gallery
// Create tag → Community Templates → search "Klaviyo"
// Configure Company ID and event name in the template UI.
// No Custom HTML required.

// Option B: server-side GTM
// Route klaviyo.track() calls through an sGTM client tag.
// The client forwards events to Klaviyo's server-side API.

Remediation

  1. Open the finding detail and note which tools are flagged and which tags implement them.
  2. Search the GTM Community Template Gallery for a native template for each flagged tool.
  3. For tools with an available template: create the native tag, mirror the configuration from the Custom HTML implementation, test in GTM Preview mode, then pause the Custom HTML tag.
  4. For tools without a template (Klaviyo, Drip): document the implementation in the tag description, confirm explicit consent configuration is in place, and evaluate whether server-side GTM provides a better integration path.
  5. After one reporting cycle confirms data continuity, delete the paused Custom HTML tags.

Metadata

Severity
medium
Tier
optimization
Category
ecommerce
Layer
container
Version
1
Effort
2wk (about 2 weeks)
Reversibility
non-destructive

See also

Examples

Evaluate
curl https://developer.tagmanifest.com/v1/evaluate-rule \
  -H "Authorization: Bearer $TM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_id":"ecommerce-tool-custom-html","url":"https://example.com"}'