For Website Clicks objective, how do i read the stats response to get revenue and number of conversions?

api

#1

For Website Clicks objective, how do i read the stats response to get revenue and number of conversions? Can you share a documented example that shows what we should expect and what the fields each mean? We want to make sure we are properly interpreting the response to track revenue and conversions for our customers.


#2

@jeffcunning

We have two endpoints, GET /1/stats/accounts/:account_id which allows you to pull 7 days worth of stats related to a campaign. Then we have a POST /1/stats/jobs/accounts/:account_id which gives you the ability to pull a much larger range of data through an asynchronous job. These pages and their associated links should give you everything you need.


#3

@jeffcunning: In addition, please see our Metrics and Segmentation documentation for information on the available metrics and what the response attributes correspond to.


#4

@juanshishido / @goforbrent - Can you tell us how we can get a sample response for the stats calls? The documentation says that conversion_purchases, conversion_sign_ups, conversion_site_visits are JSON Objects. So I’m assuming that means they aren’t just arrays of integers. But nowhere can I find an example of what that JSON looks like. Thanks.

cc: @jeffcunning


#5

Please see the documentation links that were previously shared.

Here is an example of what the response for metric_groups=MOBILE_CONVERSION looks like:

{
  "data_type": "stats",
  "time_series_length": 6,
  "data": [
    {
      "id": "6pfzm",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            "mobile_conversion_spent_credits": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_installs": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": [
                1,
                0,
                0,
                0,
                1,
                1
              ],
              "sale_amount": null
            },
            "mobile_conversion_content_views": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_add_to_wishlists": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_checkouts_initiated": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_reservations": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_tutorials_completed": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_achievements_unlocked": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_searches": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_site_visits": {
              "order_quantity": null,
              "post_view": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_key_page_views": {
              "post_engagement": null,
              "post_view": null
            },
            "mobile_conversion_add_to_carts": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_payment_info_additions": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_re_engages": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": [
                2,
                0,
                0,
                0,
                0,
                0
              ],
              "sale_amount": null
            },
            "mobile_conversion_shares": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_sign_ups": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_purchases": {
              "post_view": [
                2,
                1,
                1,
                0,
                0,
                0
              ],
              "order_quantity": [
                219000000,
                25000000,
                98000000,
                68000000,
                35000000,
                23000000
              ],
              "assisted": null,
              "post_engagement": [
                44,
                20,
                97,
                68,
                35,
                23
              ],
              "sale_amount": [
                50770000000,
                7930000000,
                179700000000,
                105500000000,
                29760000000,
                17040000000
              ]
            },
            "mobile_conversion_rates": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_logins": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_updates": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_levels_achieved": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            },
            "mobile_conversion_downloads": {
              "post_view": null,
              "post_engagement": null,
              "order_quantity": null,
              "sale_amount": null
            },
            "mobile_conversion_invites": {
              "post_view": null,
              "order_quantity": null,
              "assisted": null,
              "post_engagement": null,
              "sale_amount": null
            }
          }
        }
      ]
    }
  ],
  "request": {
    "params": {
      "start_time": "2017-02-13T15:00:00Z",
      "segmentation_type": null,
      "entity_ids": [
        "6pfzm"
      ],
      "end_time": "2017-02-19T15:00:00Z",
      "country": null,
      "placement": "ALL_ON_TWITTER",
      "granularity": "DAY",
      "entity": "CAMPAIGN",
      "platform": null,
      "metric_groups": [
        "MOBILE_CONVERSION"
      ]
    }
  }
}

#6

Okay, so I was able to generate some metric data that appears in the Ads Manager. It reports I have 8 purchases. And with each purchase, for testing, I also sent a PageView and a SignUp event with my Purchase info. I can’t tell from the documentation how to interpret this result I get from twitter ads api. Why does order quantify read 1000000 when I send num_items: '1' with each purchase event?

{
	"data_type": "stats",
	"time_series_length": 4,
	"data": [{
		"id": "979gn",
		"id_data": [{
			"segment": null,
			"metrics": {
				"conversion_purchases": {
					"order_quantity_engagement": [0, 0, 1000000, 1000000],
					"sale_amount_engagement": [0, 0, 9950000, 9950000],
					"sale_amount_view": null,
					"post_view": null,
					"order_quantity": [0, 0, 1000000, 1000000],
					"assisted": null,
					"post_engagement": [0, 3, 3, 2],
					"sale_amount": [0, 0, 9950000, 9950000],
					"metric": [0, 3, 3, 2],
					"order_quantity_view": null
				},
				"auto_created_conversion_add_to_wish_list": null,
				"conversion_sign_ups": {
					"order_quantity_engagement": [0, 0, 1000000, 0],
					"sale_amount_engagement": [0, 0, 9950000, 0],
					"sale_amount_view": null,
					"post_view": null,
					"order_quantity": [0, 0, 1000000, 0],
					"assisted": null,
					"post_engagement": [0, 3, 3, 2],
					"sale_amount": [0, 0, 9950000, 0],
					"metric": [0, 3, 3, 2],
					"order_quantity_view": null
				},
				"auto_created_conversion_sign_up_initiated": [0, 3, 3, 2],
				"auto_created_conversion_download": [0, 3, 3, 2],
				"auto_created_conversion_content_view": null,
				"auto_created_conversion_checkout_initiated": null,
				"auto_created_conversion_added_payment_info": null,
				"auto_created_conversion_complete_registration": null,
				"conversion_site_visits": {
					"order_quantity_engagement": [0, 0, 1000000, 0],
					"sale_amount_engagement": [0, 0, 9950000, 0],
					"sale_amount_view": null,
					"post_view": null,
					"order_quantity": [0, 0, 1000000, 0],
					"post_engagement": [0, 3, 3, 2],
					"sale_amount": [0, 0, 9950000, 0],
					"metric": [0, 3, 3, 2],
					"order_quantity_view": null
				},
				"conversion_custom": {
					"order_quantity_engagement": null,
					"sale_amount_engagement": null,
					"sale_amount_view": null,
					"post_view": null,
					"order_quantity": null,
					"post_engagement": null,
					"sale_amount": null,
					"metric": null,
					"order_quantity_view": null
				},
				"auto_created_conversion_add_to_cart": null,
				"auto_created_conversion_purchase": [0, 3, 3, 2],
				"auto_created_conversion_page_view": null,
				"auto_created_conversion_search": null,
				"conversion_downloads": {
					"order_quantity_engagement": [0, 0, 1000000, 0],
					"sale_amount_engagement": [0, 0, 9950000, 0],
					"sale_amount_view": null,
					"post_view": null,
					"order_quantity": [0, 0, 1000000, 0],
					"post_engagement": [0, 3, 3, 2],
					"sale_amount": [0, 0, 9950000, 0],
					"metric": [0, 3, 3, 2],
					"order_quantity_view": null
				}
			}
		}]
	}],
	"request": {
		"params": {
			"start_time": "2017-06-22T04:00:00Z",
			"segmentation_type": null,
			"entity_ids": ["979gn"],
			"end_time": "2017-06-26T04:00:00Z",
			"country": null,
			"placement": "ALL_ON_TWITTER",
			"granularity": "DAY",
			"entity": "LINE_ITEM",
			"platform": null,
			"metric_groups": ["WEB_CONVERSION"]
		}
	}
}

My request was:

twurl -H https://ads-api.twitter.com "/1/stats/accounts/18ce54glvsr?entity=LINE_ITEM&start_time=2017-06-22&granularity=DAY&metric_groups=WEB_CONVERSION&end_time=2017-06-26&placement=ALL_ON_TWITTER&entity_ids=979gn"


#7

Currently, this value is returned in micros, which corresponds to a value of 1.