datalayer

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package datalayer audits Google Tag Manager / gtag wiring and the dataLayer event stream. It runs two tiers of checks. The static tier reads the page HTML and works in any mode: GTM <noscript> fallback, snippet placement, dataLayer pushes before the dataLayer is initialized, gtag config IDs with no matching loader, and Consent Mode defaults. The runtime tier needs headless rendering (--render headless), which captures the post-JS window.dataLayer and the page's network beacons: it inventories events, validates GA4 e-commerce events and their parameter types, flags duplicate conversions and PII pushed into the dataLayer, and confirms detected tags actually fired a beacon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct{}

Analyzer audits GTM/gtag configuration and the dataLayer event stream.

func New

func New() *Analyzer

New returns a dataLayer analyzer.

func (Analyzer) Analyze

func (a Analyzer) Analyze(_ context.Context, result *crawler.Result) []analyze.Issue

func (Analyzer) Description

func (Analyzer) Description() string

func (Analyzer) Name

func (Analyzer) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL