How to retrieve custom conversion tracking tags using the API?


#1

Hi all

For my application I need to retrieve the list of conversion tags that one campaign has.

The only way I found to retrieve the conversion tracking list is to parse the response of ‘/stats/accounts/:account_id/campaigns/’ with a regular expression (which is weird) like this:

for (var prop in response.data) {
    var obj = response.data[prop];
    if (response.data.hasOwnProperty(prop)) {
        if (prop.match(/^conversion_/)) {
            ...
            console.log(prop);
            ...
        }
    }
}

And this is what I get after parsing the response:

"conversion_list":
    [
        {
            "name": "sign ups",
            "original_name": "conversion_sign_ups"
        },
        {
            "name": "sale amount",
            "original_name": "conversion_sale_amount"
        },
        {
            "name": "order quantity",
            "original_name": "conversion_order_quantity"
        },
        {
            "name": "downloads",
            "original_name": "conversion_downloads"
        }
    ]

I have a campaign with custom conversion tracking tags, so the question is, How do I retrieve the list of conversion tracking tags available for a particular campaign? Is there any endpoint for that?

thanks in advance :smile:


#2

Hello? Is there anyone who can help me ? :smile:


#3

We don’t currently support custom-defined conversion tags at all, so the conversion tags you pull for a given campaign will always be part of a predefined list (please see the metrics under the conversions category). There is a CUSTOM event tag type, and the corresponding metric for that is conversion_custom.

Related Documentation:
https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/web_event_tags
https://dev.twitter.com/ads/campaigns/metrics-and-segmentation


How to get Conversion descriptions
#4

If my accounts has multiple site_visit tags is there a way to distinguish between these through the stats API? We can tell we’re getting site visits but not which part of our site. It’s great that we can distinguish between site visits, sign ups and purchases but we can 't delve deeper into each of these.