Dynamic Data To Google Sheet

时间:2017-12-18 06:29:51

标签: google-sheets google-tag-manager dynamic-data

I'm trying to pull dynamic data (form) to a google sheet. I can't seem to find the right function. I'm running this:

function name(){
return  $('input[type="text"]').val();
}

I tried this:

function fullname(){
return $('#form-field-1-1').val();
}

No success for now.

I've attached the elements below.

Thank you [https://i.stack.imgur.com/Tt5Gk.png]

1 个答案:

答案 0 :(得分:0)

您最好的选择是使用Variable" DOM元素"并通过ID捕获它。但如果您更喜欢自定义JS,那么这样做:

function(){
    return document.getElementById('form-field-1-1').innerHTML;
}

希望它有所帮助。