good morning
The question is, what code should be used in the javascript fragment to be able to save custom attributes with predictive engagenment, to later be able to visualize them in AttributeLists or Attributes to obtain a session of the path in the architect workflow?
since in tests carried out with a fragment like this, there is no data in AttributeLists or Attributes to obtain a session of the path in the architect workflow
{
"AttributeLists": [
],
"Attributes": [
],
this is the javascript snippet used
/* fragmento /
var apd_temporizador = setInterval(function() {
if(document.readyState === "complete") {
clearInterval(apd_temporizador);
var apd_script = document.getElementsByTagName("script")[0];
var apd_fragmentoPredictiveEngagement = document.createElement("script");
apd_fragmentoPredictiveEngagement.text = "(function(a,t,c,l,o,u,d){a['_genesysJourneySdk']=o;a[o]=a[o]||function(){(a[o].q=a[o].q||[]).push(arguments)},a[o].l=1new Date();u=t.createElement(c),d=t.getElementsByTagName(c)[0];u.async=1;u.src=l;u.charset='utf-8';d.parentNode.insertBefore(u,d)})(window,document,'script','https://apps.mypurecloud.com/journey/sdk/js/web/v1/ac.js','ac');ac('init','79a2397c-74b7-4268-90bd-b0d6721b08b2',{region:'use1'});if(document.URL=='https://seguros.sura.cl/'){ac('destroy');alert('Información de seguimiento eliminada')}else{ac('pageview',{location:location.href,title:document.title+' ('+location.href+')'})};ac('forms:track','form',{captureFormDataOnSubmit:true,captureFormDataOnAbandon:true})";
apd_script.parentNode.insertBefore(apd_fragmentoPredictiveEngagement, apd_script);
}}, 100);
/fragmento/
/* Prueba obtener informacion de input de formulario con timer*/
document.onclick=apd_evaluarClick;
function apd_evaluarClick(evento){
/* Script para elementos de formulario rut, dv, email y telefono */
if (location.pathname == '/movilidad/seguroxkm') {
if(evento.target.id=="rut" && evento.target.tagName=="INPUT"){
ac("identify"
, "mgomez@e-contact.cl"
, {givenName:"Mauricio Gomez"
, email:"mgomez@e-contact.cl"
, cellPhone:"987654321"});
ac("record","usuario_identificado")
}}};