I have a trigger that does work which is a custom event > some custom events. {{dlv – email}} contains @
{{dlv – email}} pulls information from the following code
`<script>
(function () {
var element = document.querySelector('input[name="contact_details_email"]')
element.addEventListener("change", function(e) {
dataLayer.push({
'event': 'email',
'email': e.target.value
});
}, true);
})();
</script>`
I have another variable {{JS contact form country}} which is custom JavaScript as it’s pulling data from a drop down selection.
`function () {
var country = document.getElementById('country_id').selectedOptions[0].text;
if (country)
return country;
else
return "Country not selected";
}
`
I’m trying to use the above in a trigger which is a custom event > some custom events. {{JS contact form country}} contains Australia
However it’s not working as the first example.
Can anyone explain what the difference is and offer any guidance?