We are currently using a third-party cookie solution and are having an issue reacting to callbacks from the service. The site is setup as a default "Umbraco Cloud" solution.
The following script is currently included in our view and executed correctly - but we have no idea how to transfer the info we are looking for to our Model or anywhere else.
<script type="text/javascript">
window.addEventListener('CookieConsentGiven', function (event) {
// The info we need is located in event.detail.user
// Invoke call-back to c# (model or static class)
}, false);
We have looked into DotNet.invokeMethodAsync, but no luck so far (DotNet not recognized).
Any help will be highly appreciated. What is the best practice in this case?
Transfer data from JS callback.
Hi
We are currently using a third-party cookie solution and are having an issue reacting to callbacks from the service. The site is setup as a default "Umbraco Cloud" solution.
The following script is currently included in our view and executed correctly - but we have no idea how to transfer the info we are looking for to our Model or anywhere else.
We have looked into DotNet.invokeMethodAsync, but no luck so far (DotNet not recognized).
Any help will be highly appreciated. What is the best practice in this case?
Best regards Simon
Are you using jQuery? if so you could add an $ajax post/get to your event listener
Thank you @Reddick.
I ended up using an ApiController and jQuery, as you suggested.
is working on a reply...