Возможно так?
<script type='text/javascript'>
function lp_pixel_callback(tokens) {
document.getElementsByClassName('device_name_1')[0].textContent = tokens.device_name;
var device = document.getElementsByClassName('device_name_1')[0].textContent;
}
</script>