503 error occurring seemingly connected with mobile_conversion_re_engages metric

analytics
best-practices

#1

I don’t know whether this is a bug or not, but I’m experiencing a 503 error when calling the GET stats/accounts/:account_id/funding_instruments endpoint. The error only occurs for this endpoint (our application calls 12 endpoints in total), and it also only occurs for 1 of the 3 accounts we’re currently testing with. We supply a large number of metrics to this call, and following some investigation I’ve established that the inclusion of the mobile_conversion_re_engages metric is the sole cause, i.e. removing only this one from the request list causes it to works correctly, giving a 200 response.

The API call which causes the error (i.e. including mobile_conversion_re_engages) is as follows:

https://ads-api.twitter.com/0/stats/accounts/d80pk/funding_instruments?funding_instrument_ids=k6ht8%2Cjnakz%2Cjbhmt%2Cjagwk%2Cj6k9i%2Cj39vr%2Cj2ux7%2Cj0v35%2Cj08ot%2Ciyi5r%2Citu6r%2Cinhuf%2Cik9z8%2Cihxqd%2Ci97r5%2Ci5v4g%2Chy3wn%2Cgu1ir&start_time=2016-02-07T00%3A00%3A00-0800&end_time=2016-02-07T23%3A59%3A59-0800&granularity=DAY&with_deleted=true&metrics=conversion_custom%2Cconversion_downloads%2Cconversion_order_quantity%2Cconversion_purchases%2Cconversion_sale_amount%2Cconversion_sign_ups%2Cconversion_site_visits%2Cpromoted_account_follows%2Cbilled_engagements%2Cbilled_follows%2Cpromoted_tweet_profile_clicks%2Cpromoted_tweet_profile_engagements%2Cpromoted_tweet_profile_favorites%2Cpromoted_tweet_profile_follows%2Cpromoted_tweet_profile_replies%2Cpromoted_tweet_profile_retweets%2Cpromoted_tweet_profile_url_clicks%2Cpromoted_tweet_profile_card_engagements%2Cpromoted_tweet_search_clicks%2Cpromoted_tweet_search_engagements%2Cpromoted_tweet_search_favorites%2Cpromoted_tweet_search_follows%2Cpromoted_tweet_search_replies%2Cpromoted_tweet_search_retweets%2Cpromoted_tweet_search_url_clicks%2Cpromoted_tweet_search_card_engagements%2Cpromoted_tweet_timeline_clicks%2Cpromoted_tweet_timeline_engagements%2Cpromoted_tweet_timeline_favorites%2Cpromoted_tweet_timeline_follows%2Cpromoted_tweet_timeline_replies%2Cpromoted_tweet_timeline_retweets%2Cpromoted_tweet_timeline_url_clicks%2Cpromoted_tweet_timeline_card_engagements%2Cmobile_conversion_achievement_unlocked%2Cmobile_conversion_add_to_cart%2Cmobile_conversion_added_payment_infos%2Cmobile_conversion_add_to_wishlist%2Cmobile_conversion_checkout_initiated%2Cmobile_conversion_content_views%2Cmobile_conversion_installs%2Cmobile_conversion_invites%2Cmobile_conversion_level_achieved%2Cmobile_conversion_logins%2Cmobile_conversion_purchases%2Cmobile_conversion_re_engages%2Cmobile_conversion_sign_ups%2Cmobile_conversion_rated%2Cmobile_conversion_reservations%2Cmobile_conversion_searches%2Cmobile_conversion_shares%2Cmobile_conversion_spent_credits%2Cmobile_conversion_tutorial_completes%2Cmobile_conversion_updates%2Cpromoted_tweet_app_install_attempts%2Cpromoted_tweet_app_open_attempts%2Cpromoted_tweet_timeline_media_views%2Cpromoted_tweet_search_media_views%2Cpromoted_tweet_profile_media_views%2Cpromoted_tweet_tpn_media_views%2Cpromoted_account_follow_rate%2Cpromoted_account_impressions%2Cpromoted_account_profile_visits%2Cpromoted_tweet_search_engagement_rate%2Cpromoted_tweet_profile_impressions%2Cpromoted_tweet_search_impressions%2Cpromoted_tweet_timeline_engagement_rate%2Cpromoted_tweet_timeline_impressions%2Cpromoted_tweet_timeline_qualified_impressions%2Cpromoted_tweet_search_qualified_impressions%2Cpromoted_tweet_profile_qualified_impressions%2Cpromoted_tweet_tpn_qualified_impressions%2Cbilled_charge_local_micro%2Cpromoted_tweet_tpn_card_engagements%2Cpromoted_tweet_tpn_engagement_rate%2Cpromoted_tweet_tpn_engagements%2Cpromoted_tweet_tpn_clicks%2Cpromoted_tweet_tpn_favorites%2Cpromoted_tweet_tpn_follows%2Cpromoted_tweet_tpn_impressions%2Cpromoted_tweet_tpn_replies%2Cpromoted_tweet_tpn_retweets%2Cpromoted_tweet_tpn_url_clicks%2Cpromoted_video_cta_clicks%2Cpromoted_video_replays%2Cpromoted_video_total_views%2Cpromoted_video_views_100%2Cpromoted_video_views_25%2Cpromoted_video_views_50%2Cpromoted_video_views_75%2Cmobile_conversion_achievement_unlocked_breakdown%2Cmobile_conversion_add_to_cart_breakdown%2Cmobile_conversion_add_to_wishlist_breakdown%2Cmobile_conversion_added_payment_infos_breakdown%2Cmobile_conversion_checkout_initiated_breakdown%2Cmobile_conversion_content_views_breakdown%2Cmobile_conversion_installs_breakdown%2Cmobile_conversion_invites_breakdown%2Cmobile_conversion_level_achieved_breakdown%2Cmobile_conversion_logins_breakdown%2Cmobile_conversion_purchases_breakdown%2Cmobile_conversion_rated_breakdown%2Cmobile_conversion_re_engages_breakdown%2Cmobile_conversion_reservations_breakdown%2Cmobile_conversion_searches_breakdown%2Cmobile_conversion_shares_breakdown%2Cmobile_conversion_sign_ups_breakdown%2Cmobile_conversion_spent_credits_breakdown%2Cmobile_conversion_tutorial_completes_breakdown%2Cmobile_conversion_updates_breakdown

The response is as follows:

HTTP/1.1 503 Service Temporarily Unavailable [content-disposition: attachment; filename=json.json, content-type: application/json;charset=utf-8, date: Tue, 09 Feb 2016 10:38:42 GMT, retry-after: 2016-02-09T10:38:42Z, server: tsa_b, set-cookie: guest_id=v1%3A145501431720233005; Domain=.twitter.com; Path=/; Expires=Thu, 08-Feb-2018 10:38:42 UTC, strict-transport-security: max-age=631138519, x-access-level: read, x-connection-hash: 2f9745f7f6753373db08b7d816a24bfa, x-content-type-options: nosniff, x-cost-rate-limit-limit: 5000, x-cost-rate-limit-remaining: 5000, x-cost-rate-limit-reset: 1455014377, x-frame-options: SAMEORIGIN, x-request-cost: 0, x-response-time: 4865, x-runtime: 4.852649, x-transaction: b8908a14fd3b4fcb, x-xss-protection: 1; mode=block]

Account ID: d80pk (c.f. request above)

Impact: No production impact as we’re not yet live.

Please let me know if more information is required, many thanks.


Further investigation around number of funding instruments and 503 error
#2

It is likely that you are requesting for too much data at once by specifying many funding instruments. Since a funding instrument is one of the most expensive levels of aggregate data to request data at, we would recommend that you request only 1 at a time and only for metrics that would make sense to analyze at a high level (such as basic billing information). Please also review our Best Practices document here: https://dev.twitter.com/ads/analytics/best-practices

Thanks,

John


Further investigation around number of funding instruments and 503 error
#3