Track 1 · Login & personalization

Know your reader inside the Riddle

Your site already knows who is logged in. These four demos show how to hand that to Riddle: to greet readers by name, keep quizzes for members, log readers in from inside a quiz and rank them on a leaderboard.

The one idea behind all four

window.riddleDataLayer.push(
  { key: 'is_logged_in', value: '1' },
  { key: 'display_name', value: 'Livia' }
);

The page fills riddleDataLayer before the Riddle loads. Riddle turns each key into a variable for text, logic and forms.

What you need on your side.

A login you already have

WordPress, a paywall, an SSO provider: anything that knows the user on the server or in the browser.

The script embed

Use Riddle's script embed code. A plain iframe can't receive the data layer.

A privacy decision

Pass the least you need. A first name greets; an email address rarely belongs in the data layer.

Scroll to Top