Sign in
Lexy
Pricing Blog Lexy Originals About FAQ Help Center
Back to Help center

Track Lexy games in your own analytics

Game starts, answers and scores as Google Tag Manager events and page events, with nothing about the reader.

Reports
Updated October 10, 2026

Your Lexy reports show every play. If your team also measures your site in Google Tag Manager, Google Analytics or another tool, the widget can tell that tool what readers do in a game too: when they start, how each answer goes, and how they finish.

There is nothing to switch on. Once the widget is on a page, it sends these events to that page by itself.

What the widget sends

The widget sends each event in two ways at once:

  • To Google Tag Manager: a push to the page's dataLayer, under the event name in the first column.
  • As a page event: a lexy: event on the page, for your own scripts. Its name is in the second column.
Event name (Tag Manager)Page eventWhen it happens
lexy_play_clicklexy:play_clickA reader presses Play on a game card.
lexy_game_startlexy:game_startA game starts on the page: web play, or the gated card opening.
lexy_call_startlexy:call_startA reader uses Call Now to Play and Lexy places the call. The game then happens on their phone, so a phone game sends no answer or finish events to the page.
lexy_answerlexy:answerA reader answers a question, by tapping or out loud.
lexy_game_completelexy:game_completeA reader reaches the score screen.
lexy_game_exitlexy:game_exitA reader closes a game before the end.

What each event carries

Tag Manager fieldPage event fieldWhat it is
lexy_widget_idwidgetIdThe widget's number, as on My Widgets.
lexy_game_idgameIdThe game's number. The gated card's questions come from the page, so its events have no game number.
lexy_game_titletitleThe game's title, or the page's title on the gated card.
lexy_langlangThe game's language: en, es, tr or ar.
lexy_surfacesurfaceWhere it happened: card (a game card), modal (the game window), gated (a gated card in the article) or overlay (a gated card in the corner).
lexy_play_methodmethodonline or phone.
lexy_questionquestionWhich question, counting from 1. On lexy_game_exit, the question the reader had reached.
lexy_totaltotalHow many questions the game has.
lexy_correctcorrectOn lexy_answer: true if the answer was right.
lexy_scorescoreAnswers right so far.
lexy_percentpercentThe score as a share of the questions, 0 to 100.

A field is left out when it doesn't apply, for example lexy_correct on a game start.

No event carries anything about the reader: no name, email, phone number or account. They describe the game, not the person.

Use them in Google Tag Manager

  1. In Tag Manager, go to Triggers and click New. Choose Custom Event.
  2. For Event name, enter one of the names above, for example lexy_game_complete. To catch every Lexy event with one trigger, enter lexy_.* and tick Use regex matching.
  3. Go to Variables, click New under User-Defined Variables and choose Data Layer Variable. Enter a field name, such as lexy_score. Make one for each field you want.
  4. Make a tag that uses the trigger, for example a Google Analytics: GA4 Event tag. Set its event name to {{Event}} and add the variables you made as parameters.
  5. Preview, play a game on your page, and check the events in the preview panel. Then publish the container.

Use them in your own scripts

Every event is also a page event, so your own code can listen without Tag Manager:

document.addEventListener('lexy:game_complete', function (e) {
  console.log(e.detail.title, e.detail.score + ' of ' + e.detail.total);
});

Listen on document to hear every Lexy widget on the page. With more than one, e.detail.widgetId tells them apart.

Turn off the Tag Manager push

To keep Lexy out of your dataLayer, add this line to the page before the Lexy script tag:

<script>window.LexyWidget = { dataLayer: false };</script>

The page events still fire, so your own scripts keep working.

Good to know

  • Lexy's reports don't depend on these events. Your stats on lexy.fm stay complete even if your tags are off or blocked.
  • The events are yours. Lexy doesn't read what your tags do with them.
  • They follow the page. A game opened from a share link or a QR code plays on lexy.fm, not on your page, so it sends nothing to your analytics. It still counts in your Lexy stats.