Skip to content

HTML Attributes

Add data-ed-* attributes to your markup. The EventDash tracker script must be installed first — attributes are declarative, not a no-JS alternative.

Goal tracking
Use data-ed-goal (preferred)
html
<!-- Track a button click -->
<button data-ed-goal="signup_clicked">Sign Up</button>

<!-- Track a link click -->
<a href="/pricing" data-ed-goal="pricing_viewed">View Pricing</a>

<!-- Goals with parameters (kebab-case → snake_case) -->
<button
  data-ed-goal="purchase"
  data-ed-goal-amount="99.99"
  data-ed-goal-currency="USD"
>
  Buy Premium
</button>

<button data-ed-goal="add_to_cart" data-ed-goal-item-id="sku_123">
  Add to cart
</button>

Alias: data-fast-goal works for goals only. Prefer data-ed-* in new code.

Scroll tracking
Use data-ed-scroll (no data-fast alias)
html
<!-- Fire when ~50% of the section is visible (default) -->
<section data-ed-scroll="pricing_section_viewed">
</section>

<!-- Custom visibility threshold (0–1) -->
<div data-ed-scroll="hero_viewed" data-ed-scroll-threshold="0.75">
</div>