fredericharnois/facebook-ads-reporting-google-apps-script

Organizing report results

Closed this issue · 2 comments

Frederic,
Thanks for the scripts.

How can I sort by Campaign name? (I am able to sort by reach is it only numbers that can be sort?)
I see the following explanation but looks like I am missing something when trying it.

sort
list
Default value: Array
Field to sort the result, and direction of sorting. You can specify sorting direction by appending "_ascending" or "_descending" to the sort field. For example, "reach_descending". For actions, you can sort by action type in form of "actions:<action_type>". For example, ["actions:link_click_ascending"]. This array supports no more than one element. By default, the sorting direction is ascending.

Once again many thanks...

Hi @avkeren!

Glad you find the script useful.

Does adding this parameter: &sort=campaign_name_descending to const facebookUrl in request-facebook-report.js solve this issue?

Thanks!

Frederic,
Thanks for the reply.
I did try that with no success. (after having success with &sort=reach_descending)
So I ended up getting it sorted after I run the getFacebookReport (only after the report lands in the google sheet)

Thanks again and have a great day.