Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super helpful script. Thank you. #19

Open
zakloh8888 opened this issue Oct 14, 2020 · 0 comments
Open

Super helpful script. Thank you. #19

zakloh8888 opened this issue Oct 14, 2020 · 0 comments

Comments

@zakloh8888
Copy link

Than you so much for this script. So helpful.

However, can I ask why the below only pulls in 50% of the fields. Also, I cannot get things like leads, landing page views, cost per landing page view, conversions, cost_per_conversion or any custom metrics that exist in my account. Also, do all custom conversions need an ID? Thank you for your continuing guidance.

`// ad, adset, campaign, account
const LEVEL = 'account'

// https://developers.facebook.com/docs/marketing-api/insights/parameters#fields
const FIELDS = 'frequency,spend,conversions,cost_per_conversion,cpm,impressions,full_view_impressions,cpp,reach,full_view_reach,unique_outbound_clicks,unique_outbound_clicks_ctr,cost_per_unique_outbound_click,website_ctr,ctr,cost_per_action_type'
// https://developers.facebook.com/docs/marketing-api/insights/parameters#param
const DATE_RANGE = 'lifetime'

// user access token linked to a Facebook app
const TOKEN = 'EA'

// number of days from 1 to 90
const TIME_INCREMENT = '1'

// https://developers.facebook.com/docs/marketing-api/insights/parameters#param
const FILTERING = "[{'field':'action_type','operator':'IN','value':['offsite_conversion.fb_pixel_lead','offsite_conversion.fb_pixel_view_content','outbound_click','link_click']}]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant