Running this script:
var query = 'SELECT \
customer.id,\
customer.descriptive_name,\
group_placement_view.placement_type,\
group_placement_view.display_name,\
group_placement_view.placement,\
group_placement_view.target_url,\
metrics.impressions,\
metrics.cost_micros,\
metrics.conversions,\
metrics.video_views,\
metrics.video_view_rate,\
metrics.clicks,\
metrics.average_cpm,\
metrics.ctr\
FROM group_placement_view\
WHERE\
group_placement_view.placement_type IN ("YOUTUBE_CHANNEL")\
AND campaign.advertising_channel_type = "VIDEO"\
AND segments.date BETWEEN "'+ fromDate.query_date + '" AND "' + toDate.query_date + '"';
var payload = {
"pageSize": MAX_GADS_IDS,
"query": query
};
Shows in the logs an escaped string which leads to Google-Ads REST syntax error. Is there a way make another form of escaping that won't break the syntax?