Tweet Engager Retargeting in v3?

targeting

#1

Hi,

Is Tweet Engager Retargeting still available through the API in v3? Because I can’t find how to add it.
In v2 it was available through the PUT accounts/:account_id/targeting_criteria endpoint, but this endpoint was removed in v3. And I can’t see any option for this on the POST accounts/:account_id/targeting_criteria endpoint at https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/targeting-criteria#post-accounts-account-id-targeting-criteria.

Thank you!


#2

Thanks for the question, @majoritasdev.

Applying Tweet engager retargeting is a two-step process.

  • First, specify the engagement type you’d like to retarget. Possible values here are IMPRESSION or ENGAGEMENT for Tweets or VIDEO_VIEW, VIDEO_VIEW_PARTIAL, or VIDEO_VIEW_COMPLETE for videos.
  • Next, you specify whether the retargeting should happen for promoted (CAMPAIGN_ENGAGEMENT) or organic (USER_ENGAGEMENT) content.

Let’s look at an example, below.

Using the POST accounts/:account_id/targeting_criteria endpoint:

$ twurl -X POST -H ads-api.twitter.com "/3/accounts/18ce54d4x5t/targeting_criteria?line_item_id=5r2my&targeting_type=ENGAGEMENT_TYPE&targeting_value=IMPRESSION"
{
  "data": {
    "line_item_id": "619jl",
    "name": "RETARGETING_ENGAGEMENT_TYPE",
    "id": "hypp05",
    "account_id": "18ce54d4x5t",
    "operator_type": "EQ",
    "created_at": "2018-03-06T21:59:44Z",
    "targeting_value": "IMPRESSION",
    "updated_at": "2018-03-06T21:59:44Z",
    "deleted": false,
    "targeting_type": "ENGAGEMENT_TYPE"
  },
  "request": {
    "params": {
      "line_item_id": "619jl",
      "targeting_type": "ENGAGEMENT_TYPE",
      "targeting_value": "IMPRESSION",
      "account_id": "18ce54d4x5t"
    }
  }
}

$ twurl -X POST -H ads-api.twitter.com "/3/accounts/18ce54d4x5t/targeting_criteria?line_item_id=619jl&targeting_type=USER_ENGAGEMENT&targeting_value=756201191646691328"
{
  "data": {
    "line_item_id": "619jl",
    "name": "USER_ENGAGER_RETARGETING",
    "id": "hypp9w",
    "account_id": "18ce54d4x5t",
    "operator_type": "EQ",
    "created_at": "2018-03-06T22:00:49Z",
    "targeting_value": 756201191646691328,
    "updated_at": "2018-03-06T22:00:49Z",
    "deleted": false,
    "targeting_type": "USER_ENGAGEMENT"
  },
  "request": {
    "params": {
      "line_item_id": "619jl",
      "targeting_type": "USER_ENGAGEMENT",
      "targeting_value": 756201191646691328,
      "account_id": "18ce54d4x5t"
    }
  }
}

I hope this helps!


#3

Thank you, @juanshishido, it does help! Just two more questions, please:

  1. could these two steps be done at the same time with the batch endpoint? Being added in the order you specified.

  2. in order to use this kind of targeting do we still need to check that the account has the feature ENGAGER_RETARGETING, or is it available to everybody now?

And, of course, these two values for targeting_type and targeting_value should be added to the documentation at POST accounts/:account_id/targeting_criteria as well. Could you pass this along please?

Thank you.


#4

Good questions. Yes, these two steps can definitely be done at the same time, @majoritasdev. In fact, we encourage the use of the batch endpoints.

$ twurl -A "Content-Type: application/json" -X POST -H ads-api.twitter.com "/3/batch/accounts/18ce54d4x5t/targeting_criteria" -d '[{"operation_type":"Create","params":{"line_item_id":"64ks4","targeting_type":"ENGAGEMENT_TYPE","targeting_value":"IMPRESSION"}}, {"operation_type":"Create","params":{"line_item_id":"64ks4","targeting_type":"USER_ENGAGEMENT","targeting_value":"756201191646691328"}}]'
{
  "data": [
    {
      "line_item_id": "64ks4",
      "name": "RETARGETING_ENGAGEMENT_TYPE",
      "id": "hzs7ul",
      "account_id": "18ce54d4x5t",
      "operator_type": "EQ",
      "created_at": "2018-03-08T19:20:10Z",
      "targeting_value": "IMPRESSION",
      "updated_at": "2018-03-08T19:20:10Z",
      "deleted": false,
      "targeting_type": "ENGAGEMENT_TYPE"
    },
    {
      "line_item_id": "64ks4",
      "name": "USER_ENGAGER_RETARGETING",
      "id": "hzs7um",
      "account_id": "18ce54d4x5t",
      "operator_type": "EQ",
      "created_at": "2018-03-08T19:20:10Z",
      "targeting_value": 756201191646691328,
      "updated_at": "2018-03-08T19:20:10Z",
      "deleted": false,
      "targeting_type": "USER_ENGAGEMENT"
    }
  ],
  "request": [
    {
      "params": {
        "line_item_id": "64ks4",
        "targeting_type": "ENGAGEMENT_TYPE",
        "targeting_value": "IMPRESSION",
        "account_id": "18ce54d4x5t"
      },
      "operation_type": "Create"
    },
    {
      "params": {
        "line_item_id": "64ks4",
        "targeting_type": "USER_ENGAGEMENT",
        "targeting_value": 756201191646691328,
        "account_id": "18ce54d4x5t"
      },
      "operation_type": "Create"
    }
  ]
}

Yes, ad accounts still need the account feature. Trying to add this type of targeting for an ads account that is not whitelisted will results in the following error:

{
  "request": [
    {
      "params": {
        "line_item_id": "5t0ac",
        "targeting_type": "USER_ENGAGEMENT",
        "targeting_value": 2417045708,
        "account_id": "18ce54aymz3"
      },
      "operation_type": "Create"
    },
    {
      "params": {
        "line_item_id": "5t0ac",
        "targeting_type": "ENGAGEMENT_TYPE",
        "targeting_value": "IMPRESSION",
        "account_id": "18ce54aymz3"
      },
      "operation_type": "Create"
    }
  ],
  "operation_errors": [
    [
      {
        "code": "INVALID",
        "message": "Cannot set USER_ENGAGER_RETARGETING to targeting type field because feature ENGAGER_RETARGETING is not enabled for this account",
        "attribute": "targeting_type"
      }
    ],
    []
  ]
}

Thanks!


#5

Thank you so much for your help and examples, @juanshishido! :slight_smile: :+1: