Developers » API methods » Ads API » ads.createTargetGroup
Ads APIads.createTargetGroup
Creates a group to re-target ads for users who visited advertiser's site (viewed information about the product, registered, etc.).
When executed successfully this method returns user accounting code on advertiser's site. You shall add this code to the site page, so users registered in VK will be added to the created target group after they visit this page.

Use ads.importTargetContacts method to import existing user contacts to the group.

Please note! Maximum allowed number of groups for one advertising account is 10.

This method can be called with a user token. Access rights required: ads.
Parameters
account_idAdvertising account ID.
required parameter, int (number)
client_idOnly for advertising agencies.
ID of the client with the advertising account where the group will be created.
int (number)
nameName of the target group a string up to 64 characters long.
required parameter, string
lifetimeFor groups with auditory created with pixel code only.

Number of days after that users will be automatically removed from the group. 0 not to remove users.
int (number), required parameter, minimum value 1, maximum value 720
target_pixel_idPixel ID if audience must be received from site
int (number)
target_pixel_rulesArray of rules for audience expansion form the pixel.

Has following format:
[
{"type": args},
{"type": args},
...
{"type": args}
]
JSON data
Possible values for type (rule's type) and args (rule's arguments):
type args
url_full_match
Exact match of page URL (http referer) where user is
page URL (string) including protocol and domain.

For example, "https:// example.com/catalog/shoes?item=836451"
url_substrings_match
Partial match of page URL (http referer) where user is
Array of strings. The match is counted if all of strings are substrings of URL.

For example, ["catalog", "men", "shoes"].
url_regex_match
Matching of page URL (http referer) where user is to a regular expression
Regular expression (string).

For example, "catalog/(men|women)/shoes?item=\d+".
event_full_match
Exact match of event name
Event name.

For example, "click-red-button".
event_substrings_match
Partial match of event name
Array of strings. The match is counted if all of strings are substrings of event name.

For example, ["click", "red", "button"].
event_regex_match
Matching of event name to a regular expression
Regular expression (string).

For example, "^click-(red|green)-\d+$".
Result
Returns an object with the following fields:
  • id audience ID;

Errors
601Permission denied. You have requested too many actions this day. Try later.
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
5.102
Story attachments are now available in the methods of the messages section.

Messages that do not fit into the Bots Long Poll API or Callback API will be cropped and tagged is_cropped. If cropping occurs, only one forwarded message or reply, and only one attachment will remain for each message.

For methods ads.createTargetGroup and ads.updateTargetGroup, the parameter lifetime is now required. The parameter can have values from 1 to 720.

Stories in stories.get from the same creator are received in chronological order. In the past, it was the other way around.

The parameter clickable_stickers was added to the methods stories.getPhotoUploadServer and stories.getVideoUploadServer