Hi, thanks for reply. Actually I’m trying to relate the links you shared regarding AddCustomerMatch. I have few doubts :
- Is adding remarketing user list audience is same as adding customer march user list? - how conversion tracker service is mapped to this ?because In old api sample there is usage of conversiontype and I’m looking similar. - what is the new api equivalent to the below code specifically conversiontracker service, create conversion type, getting and displaying conversion ids and trackers. Thanks ———— Get the ConversionTrackerService. ConversionTrackerServiceInterface conversionTrackerService = adWordsServices.get(session, ConversionTrackerServiceInterface.class); // Create conversion type (tag). (## Get the ConversionTrackerService. ConversionTrackerServiceInterface conversionTrackerService = adWordsServices.get(session, ConversionTrackerServiceInterface.class); // Create conversion type (tag). UserListConversionType conversionType = new UserListConversionType(); conversionType.setName("Mars cruise customers #" + System.currentTimeMillis()); // Create remarketing user list. BasicUserList userList = new BasicUserList(); userList.setName("Mars cruise customers #" + System.currentTimeMillis()); userList.setDescription("A list of mars cruise customers in the last year"); userList.setMembershipLifeSpan(365L); userList.setConversionTypes(new UserListConversionType[] {conversionType}); // You can optionally provide these field(s). userList.setStatus(UserListMembershipStatus.OPEN); // Create operations. UserListOperation operation = new UserListOperation(); operation.setOperand(userList); operation.setOperator(Operator.ADD); UserListOperation[] operations = new UserListOperation[] {operation}; // Add user list. UserListReturnValue result = userListService.mutate(operations); // Display results. // Capture the ID(s) of the conversion. List<String> conversionIds = new ArrayList<>(); for (UserList userListResult : result.getValue()) { if (userListResult instanceof BasicUserList) { BasicUserList remarketingUserList = (BasicUserList) userListResult; for (UserListConversionType userListConversionType : remarketingUserList.getConversionTypes()) { conversionIds.add(userListConversionType.getId().toString()); } } } // Create predicate and selector. Selector selector = new SelectorBuilder() .fields("Id", "GoogleGlobalSiteTag", "GoogleEventSnippet") .in(AdwordsUserListField.Id, conversionIds.toArray(new String[0])) .build(); // Get all conversion trackers. Map<Long, AdWordsConversionTracker> conversionTrackers = new HashMap<Long, AdWordsConversionTracker>(); ConversionTrackerPage page = conversionTrackerService.get(selector); if (page != null && page.getEntries() != null) { conversionTrackers = Arrays.stream(page.getEntries()) .collect( Collectors.toMap( conversionTracker -> conversionTracker.getId(), conversionTracker -> (AdWordsConversionTracker) conversionTracker)); } one) UserListConversionType conversionType = new UserListConversionType(); conversionType.setName("Mars cruise customers #" + System.currentTimeMillis()); // Create remarketing user list. BasicUserList userList = new BasicUserList(); userList.setName("Mars cruise customers #" + System.currentTimeMillis()); userList.setDescription("A list of mars cruise customers in the last year"); userList.setMembershipLifeSpan(365L); userList.setConversionTypes(new UserListConversionType[] {conversionType}); // You can optionally provide these field(s). userList.setStatus(UserListMembershipStatus.OPEN); // Create operations. UserListOperation operation = new UserListOperation(); operation.setOperand(userList); operation.setOperator(Operator.ADD); UserListOperation[] operations = new UserListOperation[] {operation}; // Add user list. UserListReturnValue result = userListService.mutate(operations); // Display results. // Capture the ID(s) of the conversion. List<String> conversionIds = new ArrayList<>(); for (UserList userListResult : result.getValue()) { if (userListResult instanceof BasicUserList) { BasicUserList remarketingUserList = (BasicUserList) userListResult; for (UserListConversionType userListConversionType : remarketingUserList.getConversionTypes()) { conversionIds.add(userListConversionType.getId().toString()); } } } // Create predicate and selector. Selector selector = new SelectorBuilder() .fields("Id", "GoogleGlobalSiteTag", "GoogleEventSnippet") .in(AdwordsUserListField.Id, conversionIds.toArray(new String[0])) .build(); // Get all conversion trackers. Map<Long, AdWordsConversionTracker> conversionTrackers = new HashMap<Long, AdWordsConversionTracker>(); ConversionTrackerPage page = conversionTrackerService.get(selector); if (page != null && page.getEntries() != null) { conversionTrackers = Arrays.stream(page.getEntries()) .collect( Collectors.toMap( conversionTracker -> conversionTracker.getId(), conversionTracker -> (AdWordsConversionTracker) conversionTracker)); } On Thursday, August 4, 2022 at 12:53:39 AM UTC+5:30 adsapi wrote: > Hi Shashank, > > Thank you for raising this concern to the Google Ads API Forum. > > With regard to your concern, the equivalent code sample for "create a > remarketing user list audience" in Google Ads API is the Customer Match > <https://developers.google.com/google-ads/api/docs/remarketing/audience-types/customer-match?hl=en>. > > Also, you may check these Libraries & Examples to Add Customer Match User > List > <https://developers.google.com/google-ads/api/docs/samples/add-customer-match-user-list?hl=en>. > Let > me know if you have any questions with the provided documents. > > Best regards, > [image: Google Logo] > Jinky > Google Ads API Team > > > ref:_00D1U1174p._5004Q2d4Xta:ref > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/20b4ad39-c1fd-4e57-9d55-898a996463a7n%40googlegroups.com.