Gorgias logo
Gorgias logo

All articles

Programmatically capture an emailUpdated a month ago

This suggestion isn't an official feature of our Chat widget, so our support for it is limited - we recommend that it be implemented by someone with a technical background.


You may want to set up the shopper's email programmatically - to do so, we exposed the captureUserEmail method that allows you to change the user email associated to the current Chat conversation.

1<script>
2var initGorgiasChatPromise = (window.GorgiasChat) ? window.GorgiasChat.init() : new Promise(function (resolve) { window.addEventListener('gorgias-widget-loaded', function () { resolve();})});
3
4initGorgiasChatPromise.then(function() {
5 GorgiasChat.captureUserEmail('[email protected]');
6})
7</script>
Was this article helpful?
Yes
No