Skip to content

HTML analytics integration

HTML ads provide additional data points besides impressions and clicks. AppLovin enables you to track specific in-HTML events such as when HTMLs load, when users progress through challenges, when users complete experiences, and when users click call-to-action buttons.

When to use analytics

Integrate analytics into fully immersive HTML experiences. Do not integrate analytics into shorter HTML experiences such as:

  • HTMLs with fewer than three interactions to complete
  • HTMLs that redirect in less than five seconds from the first interaction

Implementation

Basic usage

Wrap all analytics calls in a safety check:

if (typeof window.ALPlayableAnalytics != 'undefined') {
window.ALPlayableAnalytics.trackEvent('«event-name»');
}

Available events

Loading and display events

Event nameDescriptionRequiredDeduped?Report column
LOADINGIn-playable loading starts. Implement this event if you perform loading or initialization before the user can interact, for example by showing a loading screen.OptionalYesHTML loading
LOADEDIn-playable loading completes.Conditional1YesHTML loaded
DISPLAYEDThe HTML creative displays to the user and is ready for the user to interact with.RequiredYesHTML displayed

1 If you implement the LOADING event you must implement this event. Otherwise, do not implement this event.

Challenge events

Event nameDescriptionRequiredDeduped?Report column
CHALLENGE_STARTEDThe user begins a challenge in the HTML. Trigger this when the user clicks “start” or meaningfully interacts with the creative.OptionalYesChallenge started
CHALLENGE_FAILEDThe user fails a challenge by reaching a failure state.Conditional1,2YesChallenge failed
CHALLENGE_RETRYThe user retries a failed challenge.Conditional1,2,3YesChallenge retry
CHALLENGE_PASS_25The user reaches 25% completion of a challenge.Conditional1YesChallenge pass 25
CHALLENGE_PASS_50The user reaches 50% completion of a challenge.Conditional1YesChallenge pass 50
CHALLENGE_PASS_75The user reaches 75% completion of a challenge.Conditional1YesChallenge pass 75
CHALLENGE_SOLVEDThe user successfully completes a challenge.Conditional1,2YesChallenge solved

1 Only implement these events if you implement the CHALLENGE_STARTED event.
2 If you implement the CHALLENGE_STARTED event you must implement at least one of these events. If you do not implement the CHALLENGE_STARTED event, do not use these events.
3 Only implement this event if you implement the CHALLENGE_FAILED event, and only call it after the user fails the challenge.

Completion and conversion events

Event nameDescriptionRequiredDeduped?Report column
CTA_CLICKEDThe user clicks the call-to-action button inside the creative.OptionalYesCTA clicked
ENDCARD_SHOWNThe end card or summary screen inside the HTML experience is shown.OptionalYesEndcard shown

Event order

Recommended sequence:

  1. (Optional) LOADING
  2. (Optional) LOADED
  3. DISPLAYED
  4. If challenge exists
    1. CHALLENGE_STARTED
    2. (Optional) CHALLENGE_PASS_25
    3. (Optional) CHALLENGE_PASS_50
    4. (Optional) CHALLENGE_PASS_75
    5. CHALLENGE_SOLVED
  5. (Optional) ENDCARD_SHOWN
  6. (Optional) CTA_CLICKED (can occur before or after ENDCARD_SHOWN depending on design)

Fail and retry sequence (example):

  1. (Optional) LOADING
  2. (Optional) LOADED
  3. DISPLAYED
  4. CHALLENGE_STARTED
  5. (Optional) CHALLENGE_PASS_25
  6. CHALLENGE_FAILED
  7. CHALLENGE_RETRY
  8. (Optional) CHALLENGE_PASS_25
  9. (Optional) CHALLENGE_PASS_50
  10. (Optional) CHALLENGE_PASS_75
  11. CHALLENGE_SOLVED

Nuances

CTA visible from the start

  • CTA_CLICKED can happen any time after DISPLAYED, not necessarily after ENDCARD_SHOWN.

Playables with no challenge (pure interactive demo, endcard-like HTML, no win or lose)

  • Don’t use Playable Analytics.

Technical errors versus user failure

  • Do not use CHALLENGE_FAILED for crashes, JS exceptions, load failures, or timeouts caused by technical issues.

No loading screen

  • Skip LOADING and LOADED and start with DISPLAYED.

Endcard meaning

  • ENDCARD_SHOWN refers to an endcard or summary screen inside the HTML playable experience, not the post-playable endcard template outside the playable.

Key metrics you can track

Performance metrics

  • Load success rates (LOADING, LOADED)
  • Display performance (DISPLAYED)

Engagement metrics

  • Challenge engagement rates (CHALLENGE_STARTED)
  • Challenge progression (CHALLENGE_PASS_25, CHALLENGE_PASS_50, CHALLENGE_PASS_75)
  • Completion rates (COMPLETED, CHALLENGE_SOLVED)

Conversion metrics

  • Call-to-action performance (CTA_CLICKED)
  • End card effectiveness (ENDCARD_SHOWN)

Challenge performance

  • Success versus failure rates (CHALLENGE_SOLVED versus CHALLENGE_FAILED)
  • Retry behavior (CHALLENGE_RETRY)