Hi,
Due to restrictions with the Klaviyo sign up form and that there is not a clear roadmap for addressing these issues that have been a feature of many topics in the forum. We have taken the advise that one partner shared in a Klaviyo post which was to use another third party for the forms. However we have been following the developer guides on the developer site, and have been attempting to trial and error as there is a clear hole in the shared knowledge regarding the cookie tracking. But so far we have not been able to workout the issue that is meaning that the only information passed over to Klaviyo is the email address.
The status regarding consent doesn't even change. The cookie is dropped in the browser but Klaviyo is not picking it up or tracking the user from it.
As we feel this is a gap in material shared to enable us to do this successfully and the fact I am already working with a developer on this,
We would like some input to the below and information regarding how we get Klaviyo to track once signed up and how we get the consent, and the other basic information that the Klaviyo form sends to the system to work for us please. The code currently being tested is as follows:
<script>
document.addEventListener('brave_form_submitted', function (e) {
// console.log(e);
if(e.detail.popupId && e.detail.formData){
const formData = JSON.parse(e.detail.formData);
const formID = e.detail.formId;
const formDetails = brave_popup_formData[formID];
const formFields = formDetails && formDetails.fields && JSON.parse(formDetails.fields);
const emailFieldID = formFields && Object.keys(formFields).find((fieldID)=> formFields[fieldID] && formFields[fieldID].uid === 'email' );
console.log(emailFieldID, formData[emailFieldID], window._learnq)
if(emailFieldID && formData[emailFieldID]){
var _learnq = _learnq || [];
_learnq.push(['identify', {
'$email' : formData[emailFieldID]
}]);
}
}
}, false);
</script>
Thanks,
Jack