{loc_physical_ms} values and Target Type

353 views
Skip to first unread message

Pascal MERRIEN

unread,
Oct 20, 2017, 9:42:28 AM10/20/17
to AdWords API Forum
Hi,

I want to run an adwords campaign and get the physical location of the user through a parameter in the final URL. I read it is possible to add {loc_physical_ms} in the url to get the ID of the location.

I saw in the list of IDs of location that we have different Target type : Airport, City, Postcode, departement...

I would like to know how to make sure to get only the ID of the location corresponding to the City (target type) ?

Thank you

Regards
Pascal

Jude Amagoh

unread,
Oct 20, 2017, 1:47:35 PM10/20/17
to AdWords API Forum
Hi Pascal,

While using the ValueTrack Parameter, {loc_physical_ms} within your URL to get the ID of the location, you can't restrict which type of location IDs it collect's. But by utilizing the LocationCriterionService, you'll be able to retrieve the criterion ID for a location. In this scenario you must include predicates, which is equivalent to filters in the Adwords user interface. Include the location you wish to specify within your predicate to get results for that area. Here's a link with sample code in Java that illustrates this process. For other languages please visit the Adwords client library.

Best Regards, 
Jude, Adwords API Team

Pascal MERRIEN

unread,
Oct 23, 2017, 10:26:39 AM10/23/17
to AdWords API Forum
Hi Jude,

Thank you for your answer !

Best Regards
Pascal
Reply all
Reply to author
Forward
0 new messages