Display the Libravatar or DiceBear avatar as visitor's profile picture in Matomo.

Supply SHA-256 hash of the visitor's e-mail address with your tracking requests and Matomo will show the matching Libravatar/Gravatar with a DiceBear avatar fallback:

  • in the visitor profile
  • in the visits log, below browser/device/etc icons (optional)

Plugin also uses SHA-256 hash of a User ID automatically if it's an e-mail.

  • Libravatar in profile

  • Animated SVG DiceBear avatar

  • Avatars in Visits Log

Tracking code modification to provide necessary data

Place these lines before _paq.push(['trackPageView']);:

  • Pregenerated hash (PHP example)

    _paq.push(['UltimateProfileAvatar.setLibravatarHash', '<?=hash('sha256', 'some@email.addr');?>']);
    

    Value must be a 64-character lowercase hexadecimal SHA-256 hash of a lowercase e-mail.

  • E-mail as User ID

    _paq.push([['setUserId', 'some@email.addr']);
    

Pregenerated hash has a precedence over User ID when both are present.

Manual request

You can also use the libravatar_hash parameter to provide pregenerated hash via HTTP request:

https://yourdomain.com/matomo.php?idsite=1&rec=1&url=https://example.com&libravatar_hash=XXXXXXXXX`

Please share