---
updatedAt: 2026-04-07T10:11:03.000Z
agentTools:
  siteIndex: https://developers.liveramp.com/llms.txt
  projectIndex: https://developers.liveramp.com/authenticatedtraffic-api/v1.0/llms.txt
---

# Subscriber Systems and CDPs

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/0227b8d-urstydqbd23p78lfrqxj.png",
        "urstydqbd23p78lfrqxj.png",
        256,
        256,
        "#c0c3cb"
      ]
    }
  ]
}
[/block]

[block:api-header]
{
  "title": "Integrating ATS with Piano.io"
}
[/block]

Piano.io exposes an event that is fired when a user logs in. By assigning a function to this parameter, you can obtain the user's login identifiers.

[block:code]
{
  "codes": [
    {
      "code": "tp = window.tp || [];\ntp.push(['setUsePianoIdUserProvider', true]);\ntp.push([\"init\", function() {\n    tp.pianoId.init({\n        displayMode: 'inline',\n        containerSelector: '#login-form',\n        loggedIn: function(data) {\n            console.log('user ', data.user, ' logged in with token', data.token);\n        },\n        loggedOut: function() {\n            console.log('user logged out');\n        }\n    });\n}]);",
      "language": "javascript",
      "name": "Piano.io Initialization"
    }
  ]
}
[/block]

The important parameter is `loggedIn` which is mapped to an anonymous function to parse `data`. By accessing `user.data.email`, you should be able to obtain the email address that the user logged in with, then pass it to ATS, e.g.

[block:code]
{
  "codes": [
    {
      "code": "tp = window.tp || [];\ntp.push(['setUsePianoIdUserProvider', true]);\ntp.push([\"init\", function() {\n    tp.pianoId.init({\n        displayMode: 'inline',\n        containerSelector: '#login-form',\n        loggedIn: function(data) {\n            if (data){\n              window.ats.start({\n                \"placementID\":9999.\n                \"storageType\": \"cookie\",\n                \"email\": data.user.email,\n                \"logging\":\"error\"\n              });\n            }\n        },\n        loggedOut: function() {\n            console.log('user logged out');\n        }\n    });\n}]);",
      "language": "javascript",
      "name": "Piano.io with ats.js"
    }
  ]
}
[/block]

See [piano.io documentation](https://docs.piano.io/piano-id-overview#idfunctions) for more information.